the three lines of the R code below show the vector a1, b1 and "c1", which is unique from the fields a1. I want to display a data frame from two columns, where I have to get each element c1, displaying the number of times equal to the length of the elements in "a1", in one column and the corresponding identifier "b1" of this letter in another column. Just say that the data frame with the column "y", which says that the letter "a" from "c1" will be presented 6 times ago (row length a1), then "b" 6 times, then c and t .d. Also matches a in the other column “1” 6 times, then “2” 6 times, and so on. Please help and thanks.
a1 = c("a","b","c","d","a","b") b1 = c(1,2,3,4,1,2) c1 = unique(a1)
New change
a1 = c("a","b","b","d","c","e","f","a","b","c","d") b1 = c(1,1,1,2,3,2,3,1,1,3,2) c1 = unique(a1)