Re: [R] type conversion

2007-10-19 Thread Roger Mason
Hello Moshe, Moshe Olshansky <[EMAIL PROTECTED]> writes: > Try > x <- as.integer(Membersind06$actual06) > and then > x/10 I think I tried that without success (but I tried so many things, that one may have escaped me). In the meantime I changed the database relation to a numeric type [numeric(

[R] type conversion

2007-10-17 Thread Roger Mason
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(Memb

[R] apply

2007-09-19 Thread Roger Mason
". This works on individual entries, e.g. substr(files[[1]],3,4) returns "00". I wish to apply substr() to all the entries in files. All my efforts fail. Could some kind soul explain how to do what I want? Thanks, Roger Mason __ R-hel