[R] A question about POSIXct

2007-05-03 Thread Jacques Smith
Dear List: I have a simple two-column data set in .csv format, with the first column being the date and second column being some value. I use read.csv() to import the data as follows: x - read.csv(myfile.csv,header=T, dec=., colClasses=c(Date=POSIXct)) The structure of x is: str(x)

Re: [R] A question about POSIXct

2007-05-03 Thread Jacques Wagnor
A follow-up question: The example in ?attr uses a character string of dim. Besides dim and times, what other character strings are available or can be used? On 5/3/07, Michael Sumner [EMAIL PROTECTED] wrote: Hello, It seems that danish is a numeric vector with attributes attached - the

Re: [R] A question about POSIXct

2007-05-03 Thread Michael Sumner
Hello, It seems that danish is a numeric vector with attributes attached - the attribute vector is POSIXct and is the same length as danish. You can create this from a data frame like this: x - data.frame(Date = ISOdate(2007, 5, 1:10), Value = rnorm(10)) str(x) 'data.frame': 10 obs. of 2

Re: [R] A question about POSIXct

2007-05-03 Thread Jacques Wagnor
Thank you, Mike! On 5/3/07, Michael Sumner [EMAIL PROTECTED] wrote: Hello, It seems that danish is a numeric vector with attributes attached - the attribute vector is POSIXct and is the same length as danish. You can create this from a data frame like this: x - data.frame(Date =

Re: [R] A question about POSIXct

2007-05-03 Thread Michael Sumner
Jacques Wagnor wrote: A follow-up question: The example in ?attr uses a character string of dim. Besides dim and times, what other character strings are available or can be used? Ah, it's not limited to those. Any character string would do (guru caveats aside). I suspect my narrow answer