Re: [R] XLConnect readWorksheet comma decimal sign

2013-12-03 Thread Peter Keller
I can't tell since you didn't post any code, so forgive me if you've tried this. XLConnect has a colTypes parameter so you could try specifying the relevant columns to be read in as character, set forceConversion = TRUE, and then use as.numeric. Something like this: as.numeric(sub(,, .,

[R] for loop, error in model frame.default ... variable lengths differ

2012-05-21 Thread Peter Keller
I'm failing to get a for loop working. I'm sure it's something simple, and I have found some posts relating to it, but I'm just not understanding why this isn't working. I have a data frame and would like to loop through specific column names, using aggregate() within a for loop. There are

[R] how to drop fields by name when reading in data?

2010-03-19 Thread Peter Keller
I have a number of space separated files of weather data, with some equivalent column names, and differing number of fields in each file. Some of the files have 40 or more vars, but I only want a subset of the fields. I can use colClasses with read.table to drop some of the fields, but only if

[R] strange behavior, adds new field by non-existent field

2010-03-19 Thread Peter Keller
data: tmp1 Date HrMn Temp Q.4 1 19450101 0900 -37.0 1 2 19450101 1000 -35.9 2 3 19450101 1100 -35.9 3 4 19450101 1200 -36.4 4 5 19450101 1300 -36.4 5 6 19450101 1400 -36.4 6 7 19450101 1500 -36.4 7 8 19450101 1600 -37.5 9 Accidentally, I did this (I meant to write Q.4

[R] probable timezone confusion with as.yearmon

2010-03-18 Thread Peter Keller
It looks like a timezone issue, and it's causing confusion to me at least. My original data: gmt - c(19880101 , 19880101 0100, 19880101 0300, 19880101 0400, 19880101 0500, 19880101 0600) These were converted to local dates/times with akst-strptime(gmt,format=%Y%m%d %H%M)-(3600*9) # because I

Re: [R] probable timezone confusion with as.yearmon

2010-03-18 Thread Peter Keller
Thanks, that clears that up. Is this behavior documented in the help? I've looked, but didn't see anything which noted a conversion to GMT. Perhaps I just don't understand the different time methods, which is entirely possible since I'm a relative beginner. Peter -- View this message in

Re: [R] Online R documentation

2010-01-08 Thread Peter Keller
and filterable by image, function, package, task view, etc. Pretty fabulous if you ask me. At the moment, it's only updated to 2.9.0. Peter Keller -- View this message in context: http://n4.nabble.com/Online-R-documentation-tp1009656p1009942.html Sent from the R help mailing list archive at Nabble.com