0

So I got these two data frames:

a <- c('A','B','C')

frame1 <- data.frame(a)

a <- c('A','A','B','B','C','C','C')
b <- c(12,18,120,9,1,7,12)

frame2<- data.frame(a,b)

Now I would like to know how many times each unique value in column 'a' occurs in frame2 and add this value to frame1.

The result should look like this:

  a c 
1 A 2
2 B 2 
3 C 3 
sfetan
  • 109
  • 7

0 Answers0