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

Asked

Viewed 600 times

3

Good guys, I’m dealing with R in college for the first time in my life!!

So in a data frame I have a column "to" that has +20,000 values ( equal 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.

Anybody got any R? Thank you

1 answer

2

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

table(x$to)

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.