R table function -
If I have a vector If you want to add those numbers If you are not there, then you should make a factor and clearly set the level. The numbers & lt; - c (1,1,2,4,2,2, 2,2,5,4,4,4) , and I use 'table', me
Name 1 2 4 5 points 2 5 4 1 What would happen if I want to include it 3 or normally, then
name 1 2 3 4 5 digits 2 5 0 4 1
table will return a calculation for each level.
table (factor (number, level = 1: maximum (number))) # 1 2 3 4 5 # 2 5 0 4 1
Comments
Post a Comment