Re: [R] splitting First 10 words in a string

2010-11-02 Thread steven mosher
Line should be: first=second=third=fourth=fifth=sixth=seventh=eighth=ninth=tenth<-vector(length=nrow( sent)) sorry cut and past error On Tue, Nov 2, 2010 at 3:32 PM, steven mosher wrote: > That's easy you are confusing the dummy code I sent. > > Do this: > > lit<-read.csv("litologija.csv", s

Re: [R] splitting First 10 words in a string

2010-11-02 Thread steven mosher
That's easy you are confusing the dummy code I sent. Do this: lit<-read.csv("litologija.csv", sep=";", dec=".") sent <-data.frame(sentence=lit$Opis,stringsAsFactors=FALSE) irst=second=third=fourth=fifth=sixth=seventh=eighth=ninth=tenth<-vector(length=nrow( sent) I put the length of the vector

Re: [R] splitting First 10 words in a string

2010-11-02 Thread Matevž Pavlič
Hi Steven, Thank you for the help. I get an error though when i do this : >lit<-read.csv("litologija.csv", sep=";", dec=".") >sent <-data.frame(sentence=lit$Opis,stringsAsFactors=FALSE) >str(sent) >sentV<-rep(sent,10) >str(sentV) >first=second=third=fourth=fifth=sixth=seventh=eight