R table function -


If I have a vector 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  1: All the numbers from max (number)  have not even been represented in numbers. Thus, how do I generate an output such as:  
  name 1 2 3 4 5 digits 2 5 0 4 1    

If you want to add those numbers If you are not there, then you should make a factor and clearly set the level. The 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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -