[R] POSIX turns into factor

2010-10-16 Thread Toby Gass
Dear helpeRs, I am working with a dataframe that includes a column, "calendar", used for plotting time series. > class(dat$calendar) [1] "POSIXt" "POSIXlt" When I finish working, I save my data as a .csv file. When I read the file in again, "calendar" is always a factor > class(dat$calendar

Re: [R] Reshape

2010-09-27 Thread Toby Gass
quot;valley", "plot", "trt"), > timevar="fame", direction="wide") > > Michael > > > On 28 September 2010 12:17, Toby Gass > wrote: > > Hello, helpeRs, > > > > I've been trying, unsuccessfully, to change a da

[R] Reshape

2010-09-27 Thread Toby Gass
Hello, helpeRs, I've been trying, unsuccessfully, to change a dataframe from long to wide format using reshape (the original). I would appreciate it if someone could demonstrate the correct syntax. The script below will create a toy example. The new wide data should have a column name for

[R] Reshape

2010-09-27 Thread Toby Gass
Hello, helpeRs, I've been trying, unsuccessfully, to change a dataframe from long to wide format using reshape (the original). I would appreciate it if someone could demonstrate the correct syntax. The script below will create a toy example. The new wide data should have a column name for

Re: [R] interpreting date-related error message

2010-08-27 Thread Toby Gass
$doy,origin='2009-12-31') > > to get a similar Date object. > > - Phil > > > On Fri, 27 Aug 2010, Toby Gass wrote: > > > Hello, helpeRs, > > > > I have a vector of numbers from 1-365 (days of the year) th

[R] interpreting date-related error message

2010-08-27 Thread Toby Gass
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the fol

Re: [R] syntax for batching rbind process

2010-08-18 Thread Toby Gass
It works perfectly now. Thank you all. Toby On 18 Aug 2010 at 15:04, Erik Iverson wrote: > > > Toby Gass wrote: > > Thank you for the suggestions for the more efficient code. The > > problem remains, however, that the final dataframe does not contain > > the

Re: [R] syntax for batching rbind process

2010-08-18 Thread Toby Gass
e. Thank you. Toby On 18 Aug 2010 at 13:49, Erik Iverson wrote: > > > Toby Gass wrote: > > Dear helpeRs, > > > > I am attempting to read in a series of csv files so I can bind them > > into one large dataframe. I have written the following script: &

[R] syntax for batching rbind process

2010-08-18 Thread Toby Gass
Dear helpeRs, I am attempting to read in a series of csv files so I can bind them into one large dataframe. I have written the following script: test <- list.files(".", pattern = "csv") #lline 1 imp <- list()#line 2 for (i in 1:length(test)) {

Re: [R] conditional selection of dataframe rows

2010-08-12 Thread Toby Gass
e the toy dataframe a bit larger. Thanks again for the assistance. Toby On 12 Aug 2010 at 16:39, David Winsemius wrote: > > On Aug 12, 2010, at 4:06 PM, Toby Gass wrote: > > > Thank you all for the quick responses. So far as I've checked, > > Marc's solution

Re: [R] conditional selection of dataframe rows

2010-08-12 Thread Toby Gass
ll the other measurements, possibly with positive values, taken on the same day. Thank you again for your efforts. Toby On 12 Aug 2010 at 14:32, Marc Schwartz wrote: > On Aug 12, 2010, at 2:24 PM, Marc Schwartz wrote: > > > On Aug 12, 2010, at 2:11 PM, Toby Gass wrote: > > >

[R] conditional selection of dataframe rows

2010-08-12 Thread Toby Gass
Dear helpeRs, I have a dataframe (14947 x 27) containing measurements collected every 5 seconds at several different sampling locations. If one measurement at a given location is less than zero on a given day, I would like to delete all measurements from that location on that day. Here is a t

[R] extracting values conditonal on other values

2010-03-03 Thread Toby Gass
Dear R helpers, I have a dataframe (test1) containing the time of sunrise and sunset for each day of the year for 3 years. I have another dataframe (test2) containing measurements that are taken every 15 minutes, 24/7. I would like to extract all rows from test2 that occur between sunrise an

Re: [R] Error message: Bad value

2008-06-24 Thread Toby Gass
problem in the past year. Toby - Original Message - From: "Duncan Murdoch" <[EMAIL PROTECTED]> To: "Toby Gass" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, June 24, 2008 6:27 PM Subject: Re: [R] Error message: Bad value | On 24/06/2008 3:12 PM, Toby Gass wrote:

[R] Error message: Bad value

2008-06-24 Thread Toby Gass
tml I do not need a response, unless there is a preventative measure, but thought I would bring this to your attention. Thank you, Toby Toby Gass Graduate Degree Program in Ecology Department of Forest, Rangeland, and Watershed Stewardship Warner College of Natural Resources Colorado State Univers

[R] nested time series data with measurement error

2008-04-23 Thread Toby Gass
t;trt",1:2)) pre.post <- gl(2,9,length = 108, label = c("pre","post")) response <- runif(108, min = -28, max = -25) help <- data.frame(tree,month,trtmt,pre.post, response) Thank you in advance for your assistance. Toby Gass Graduate Degree Program in Ecolog