[R] Help with creating a ts (time series) object with daily sampling values

2011-03-24 Thread Pamela Allen
Hi All, I have a data set of daily measurements of river flow. I would like to create a “ts” object from this data. Here’s a sample data set: date - as.Date(c(1:300), format=%Y) year=as.numeric(format(date, format = %Y)) month=as.numeric(format(date, format = %m))

[R] Help with creating a ts (time series) object with daily sampling values

2011-03-24 Thread Pamela Allen
Hi All, I have a data set of daily measurements of river flow. I would like to create a ts object from this data. Here's a sample data set: date - as.Date(c(1:300), format=%Y) year=as.numeric(format(date, format = %Y)) month=as.numeric(format(date, format = %m))

[R] Help with plotting a line that is multicoloured based on levels of a factor

2011-03-17 Thread Pamela Allen
Hi All, I'm trying to plot data that is a time series of flows that are associated with a specific level, and I would like each level to represent a colour in a line plot. Here is some data that approximates what I'm using: date=c(1:300) flow=sin(2*pi/53*c(1:300))

[R] Error using augPred with nlme grouped data

2008-03-23 Thread Pamela Allen
file I could find about this problem suggested that I give all of my data columns the class NULL and then re-run my nlme, but this did not work. Any help would be much appreciated! -Pam Pamela Allen, MSc Candidate University of British Columbia Marine Mammal Research Unit, Fisheries Centre