column names and then sorting them

I have a data frame. and there are more collum names.
I have a column name with gerne. In the column gerne are more names.
I'm trying to find out how i can soort them ?

do you mean you want to sort your data frame. or pull out a vector of the sorted values of the column ?

arrange() is the function in the tidyverse/dplyr package to sort a frame by a column(s),
in base r for a sorted vector sort(mydf$gerne) assuming your frame is called mydf
for unique values sort(unique(mydf$gerne))

I want to know what kind and how many kinds of gerne there are in my column name of gerne. Now I have to score a lot to search. The dataset is too large for that.

#dataset is called videogames :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

you may have made a typographical error if 'gerne' is supposed to be 'genre'

table(mydf$gerne)
would give you unique counts

thank you! it was helpful :slight_smile: