Re: [R] as.xts

2012-10-17 Thread sf631
Thanks for your response as well. It turned out that this was already a date typed file but I'll file this away for future reference when I come up against a string of characters -- View this message in context: http://r.789695.n4.nabble.com/as-xts-tp3028280p4646558.html Sent from the R help m

Re: [R] as.xts

2012-10-17 Thread sf631
Wow, that was exactly what I needed (and amazingly quick). Thanks for the help Joshua, that worked perfectly. As an aside, it appears that RODBC does keep the object classes (the date field came through as a date, not string...) -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] as.xts

2012-10-17 Thread arun
2.1   A.K. - Original Message - From: sf631 To: r-help@r-project.org Cc: Sent: Wednesday, October 17, 2012 3:15 PM Subject: Re: [R] as.xts I'm not the original poster, but I do have the same question.  I have pulled in data via RODBC into a data frame, which looks like below

Re: [R] as.xts

2012-10-17 Thread arun
-- Original Message - From: sf631 To: r-help@r-project.org Cc: Sent: Wednesday, October 17, 2012 3:15 PM Subject: Re: [R] as.xts I'm not the original poster, but I do have the same question.  I have pulled in data via RODBC into a data frame, which looks like below and I&#x

Re: [R] as.xts

2012-10-17 Thread Joshua Ulrich
Hi Chad, as.xts.data.frame assumes the rownames are timestamps. Since this isn't the case for your object, you need to use the xts constructor: x <- xts(d$total, d$reportDate) This assumes your data.frame is named 'd' and that the reportDate column is actually a Date class (not character or fac

Re: [R] as.xts

2012-10-17 Thread sf631
I'm not the original poster, but I do have the same question. I have pulled in data via RODBC into a data frame, which looks like below and I'm getting the same error message: /("Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format") / The dat

Re: [R] as.xts

2012-07-16 Thread David Winsemius
a format that you can paste into your email and which other readers can paste into R and use. See ?dput for more information. John Kane Kingston ON Canada -Original Message- From: yolande@gmail.com Sent: Mon, 16 Jul 2012 11:17:43 -0400 To: r-help@r-project.org Subject: [R

Re: [R] as.xts

2012-07-16 Thread John Kane
Kingston ON Canada > -Original Message- > From: yolande@gmail.com > Sent: Mon, 16 Jul 2012 11:17:43 -0400 > To: r-help@r-project.org > Subject: [R] as.xts > > Hello, > > Attached is the file created from as.xts. After submitting the following > cod

[R] as.xts

2012-07-16 Thread Yolande Tra
Hello, Attached is the file created from as.xts. After submitting the following code, I got an error. Please help. Thanks. diveCond <- data.frame(matrix(0, nrow=61, ncol=17)) names(diveCond) <- c("dive_id", "timestamp", "visability", "r_wvht", "r_dpd", "r_apt", "r_mwd", "r_wtmp", "l_salinity", "l_

Re: [R] as.xts error

2010-12-06 Thread Joshua Ulrich
On Mon, Dec 6, 2010 at 5:57 AM, Gabor Grothendieck wrote: > On Mon, Dec 6, 2010 at 6:52 AM, Ted Zeng (曾振兴) wrote: >> >> Dear all, >> >> I am using the as.xts function to transfer a data frame to the xts >> >> The following is the code and result: >> >> a<-read.csv("price.csv") >> a$Date<-as.POSIX

Re: [R] as.xts error

2010-12-06 Thread Gabor Grothendieck
On Mon, Dec 6, 2010 at 6:52 AM, Ted Zeng (曾振兴) wrote: > > Dear all, > > I am using the as.xts function to transfer a data frame to the xts > > The following is the code and result: > > a<-read.csv("price.csv") > a$Date<-as.POSIXct(a$Date) > > str(a) > 'data.frame':   15637 obs. of  2 variables: >

[R] as.xts error

2010-12-06 Thread 曾振兴
Dear all, I am using the as.xts function to transfer a data frame to the xts The following is the code and result: a<-read.csv("price.csv") a$Date<-as.POSIXct(a$Date) str(a) 'data.frame': 15637 obs. of 2 variables: $ Date : POSIXct, format: "2010-01-04 09:45:01" "2010-01-04 09:45:02" "2

Re: [R] as.xts

2010-11-05 Thread Joshua Wiley
Hi Ela, as.xts() calls as.POSIXlt() to convert the dates to a date/time class. Evidently, the the column that contains your times is not "unambiguous" to POSIX, that is, the format is not clear. It is really impossible to give you much more advice without having some sample data or what you actu

[R] as.xts

2010-11-05 Thread spela podgorsek
hey I am trying to turn a dataframe into xts with the function: as.xts, but it returns the error: Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format could someone give me some pointers please the data is coming from a spreadsheet via the excel,

Re: [R] as.xts convert all my numeric data to character

2009-12-19 Thread ivan popivanov
$Total, tt$P.C.Ratio) colnames(yy) = c("Call", "Put", "Total", "P.C.Ratio") The last line resets the column names. HTH > From: dlvanbr...@gmail.com > Date: Sat, 19 Dec 2009 18:11:50 -0500 > To: r-help@r-project.org > Subject: [R] as.xts conve

[R] as.xts convert all my numeric data to character

2009-12-19 Thread David L. Van Brunt, Ph.D.
Hello, all... I've been playing with the TTR package and quantmod, and I'm loading the Chicago Board of Exchange put/call ratio data via a simple read.csv call... CBOEtotal<-read.csv(file=" http://www.cboe.com/publish/ScheduledTask/MktData/datahouse/totalpc.csv ",skip=1) this gives me a data fram

[R] as.xts error

2009-02-07 Thread glenn
Quick newbie question please: I am trying to turn a dataframe into xts with the function; As.xts But it returns the error; Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format could someone give me some pointers please the