Get different values of a column - Data Frame - R Language

3

Hi, I'm dealing with R in college the first time in my life and I'm completely clueless !!

So in a data frame I have a "to" column that has +20,000 values (same and different) What I wanted to know was the different values that appear there at least once and then still know how many times that value appears. / p>

Anyone know of R? Thanks

    
asked by anonymous 26.11.2016 / 13:30

1 answer

2

Assuming the data frame is called x , the command to be used is

table(x$to)

This will create a table with all the unique values in this column and the number of times each column appears.

    
26.11.2016 / 17:13