Re: [R] subsetting data by specified observation number

2011-03-05 Thread jdnew...@gmail.com
What is wrong with subset( failed.3, position == 2 ) ? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Linh Tran wrote: Hi members, I'd like to thank you guys ahead of time for the help. I'm kind of stuck. I have a data frame with ID and position numbers: 1> head(faile

Re: [R] Date arithmetic coerces POSIXlt to POSIXct?

2011-03-08 Thread jdnew...@gmail.com
You should not be surprised at any result you obtain by adding an integer to a POSIXlt... that is like adding 5 to 3 meters... 5 whats? Start by using as.difftime to specify your time units on time intervals. As it happens, the default unit used by POSIXt types is seconds, and POSIXlt is not de

Re: [R] Reshape, melt and cast query

2011-03-10 Thread jdnew...@gmail.com
I can't see the value of your first melt, which appears to result in a column filled with identical values "crop_group". You really should read the posting guide and provide a reproducible example. I suspect that you would benefit from learning how to use the plyr library. -- Sent from my Andro

Re: [R] Timezone issue with strftime/strptime and %z and %Z

2011-03-11 Thread jdnew...@gmail.com
I have found the various "tz" arguments not to provide the support I would like in terms of arbitrary timezones. For now I use Sys.setenv(TZ="timezone_spec") prior to input or output, and do not use the tz arguments. In your case, I would consider keeping a character copy of the input to write