[R] value changed after paste() function

From: kellysong <song.qiao_at_student.dit.ie>
Date: Mon, 21 Mar 2011 08:18:10 -0700 (PDT)


Hi all,

I am new user in R, I am trying to to use paste function to concatenate strings which has been fetched from database table(postgres database), the following are my code:

when i do:
 > sqlFetch(channel,'transactions')

outputs are following(only parts, there are around 200 transactions in total)

    orderid productname price quantity discount

1    T10248      potato  1.80       10     0.00
2    T10248      sweets  2.00        5     0.00
3    T10249        milk  1.99        9     0.00
4    T10249       apple  2.35       40     0.00


when i do:
> paste(sqlFetch(channel,'transactions'))

outputs are:
[1] "c(1, 1, 2, 2)"
[2] "c(7, 8, 6, 1)"
[3] "c(1.8, 2, 1.99, 2.35) "
[4] "c(10, 5, 9, 40)"
[5] "c(0, 0, 0, 0) "

any idea why the orderid and the productname have been changed?? and what should i do to solve this??

Any help would be very appreciated!

--
View this message in context: http://r.789695.n4.nabble.com/value-changed-after-paste-function-tp3393845p3393845.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 21 Mar 2011 - 16:05:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Mar 2011 - 16:50:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive