[R] how to export output

raishilpa raishilpa.bhu at gmail.com
Thu Jun 14 10:13:42 CEST 2012


hello,
I am using following command

classify_polarity(documents,algorithm="bayes",verbose=TRUE)
 output is:
[1] "DOCUMENT 1"
[1] "WORD: excited CAT: positive POL: strongsubj SCORE: 8.44419229853175"
[1] "WORD: happy CAT: positive POL: strongsubj SCORE: 8.44419229853175"
[1] "WORD: optimistic CAT: positive POL: weaksubj SCORE: 7.7510451179718"
[1] "POS: 25.670707456461 NEG: 0.445453222112551 RATIO: 57.6282899800754"

[1] "DOCUMENT 2"
[1] "WORD: annoyed CAT: negative POL: strongsubj SCORE: 9.0300168178449"
[1] "WORD: irritated CAT: negative POL: strongsubj SCORE: 9.0300168178449"
[1] "WORD: scared CAT: negative POL: strongsubj SCORE: 9.0300168178449"
[1] "POS: 1.03127774142571 NEG: 27.5355036756473 RATIO: 0.0374526557993482"

     POS                NEG                 POS/NEG              BEST_FIT  
[1,] "25.670707456461"  "0.445453222112551" "57.6282899800754"   "positive"
[2,] "1.03127774142571" "27.5355036756473"  "0.0374526557993482" "negative"

I want to export this output...what I am using is that
write.csv(documents,file="sentiment.csv")

but I am getting only following part
     POS                NEG                 POS/NEG              BEST_FIT  
[1,] "25.670707456461"  "0.445453222112551" "57.6282899800754"   "positive"
[2,] "1.03127774142571" "27.5355036756473"  "0.0374526557993482" "negative"

I want to export whole output....Can anybody help me in this regard

thanks in advance

Shilpa Rai

--
View this message in context: http://r.789695.n4.nabble.com/how-to-export-output-tp4633341.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list