[R] changing character strings with hash marks

2012-12-13 Thread simona mancini
Hi R users, I am quite new to R and I don't know how to deal with this (surely) easy issue. I need to replace words in sentences with as many hash marks as the number of characters per each word, as in the following example: Mary plays football # Any suggestion about the func

[R] subsetting levels of a vector

2012-08-10 Thread simona mancini
Hi, I need to subset different levels of vector in a dataset to create a new dataframe that contains only these. These observations are not numerical, so I can't use the subset() function (at least this is the response I get from R). Suppose the dataframe looks like this:   ParticipID    ERP