Hello, I am trying to do arithmetic on numbers extracted from a PostgreSQL database, wherein the numbers are stored as type "money". The transcript below illustrates the problem.
> Membersind06 <- sqlQuery(channel,"select * from income where rowname like > '%Membersind%'") > names(Membersind06) [1] "rowname" "item" "budget07" "budget08" "actual06" > Membersind06$actual06 [1] $149,625.00 Levels: $149,625.00 > typeof(Membersind06$actual06) [1] "integer" > Membersind06$actual06/10 [1] NA Warning message: / not meaningful for factors in: Ops.factor(Membersind06$actual06, 10) Can someone show me how to convert the quantity stored in Membersind06$actual06 to a numeric type such that I can perfor arithmetic operations on it? ______________________________________________ R-help@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.