Re: [R] unique: factor to string

2010-01-18 Thread David Winsemius
On Jan 18, 2010, at 10:05 AM, Markus Mühlbacher wrote: Hi community, I want to count the occurrence of values within a dataframe. data$names is a list of many names. It's most likely a vector. With namelist <- unique(data$names) I get all the existing names. But the result is a factor, no

Re: [R] unique: factor to string

2010-01-18 Thread Dimitris Rizopoulos
do you mean you want: table(data$names) I hope it helps. Best, Dimitris Markus Mühlbacher wrote: Hi community, I want to count the occurrence of values within a dataframe. data$names is a list of many names. With namelist <- unique(data$names) I get all the existing names. But the result

[R] unique: factor to string

2010-01-18 Thread Markus Mühlbacher
Hi community, I want to count the occurrence of values within a dataframe. data$names is a list of many names. With namelist <- unique(data$names) I get all the existing names. But the result is a factor, not a list of strings. I would then like to go trough all the names in a for-loop and cou