Skip to content
Prev 206662 / 398503 Next

unique: factor to string

On Jan 18, 2010, at 10:05 AM, Markus M?hlbacher wrote:

            
It's most likely a vector.
as.character(data$names)  # would be a character vector, i.e., a  
structure composed of "strings"
# You could make it a list if you wanted, but it's not clear that is  
needed for your purposes.
That shows your C programming background. Try instead the loop-less  
method:

table(data$names)

BTW using "names" for an object's name is not a good programing  
practice in R because there is a useful function by the same  
name.  ..... and then there is always the "dog" fortune.
-- 
David.