0

V1 is the frequency of V2 Is there a easy way to calulate the V2 mean? Or do i have to transform my table?

my data is structured like this:

V1   V2
2   18042
12  18043
4   18044
13  18045
11  18046
1   18047
6   18048
1   18049
3   18050
14  18051
1   18052
....
Max_
  • 75
  • 8

1 Answers1

3

You can use sum like

sum(x$V1*x$V2) / sum(x$V1)
GKi
  • 37,245
  • 2
  • 26
  • 48