Skip to content
Prev 267506 / 398502 Next

strsplit and forward slash '/'

Hi Federico,

A forward slash isn't a special character:
[[1]]
[1] "T" "T"

so there's some other problem.

Are you sure that your first column contains strings and not factors?
What does str(my.data) tell you?

Does
strsplit(as.character(my.data[1,1]), "/")
work?

If you used read.table() to get your data in, you might want the
as.is=TRUE or the stringsAsFactors=FALSE argument.

Sarah

On Wed, Aug 3, 2011 at 12:37 PM, Federico Calboli
<f.calboli at imperial.ac.uk> wrote: