[R] Converting data.frame to xts

2009-06-01 Thread Ken Spriggs
I have a data.frame object and I don't really understand how to made an xts class out of it. Consider: > x <- data.frame(datetime, ltp, ltv) > head(x, 2) datetime ltp ltv 1 2009-05-05 07:30:01.604 899 1 2 2009-05-05 07:30:01.963 899 15 > class(x$datetime) [1] "POSIXt" "POSI

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
So this works... Thanks. My mistake was leaving out seq_len() for (i in seq_len(nrow(Volumes))){ plot(as.numeric(deltas[i,])) Sys.sleep(0.5); } Ken Spriggs wrote: > > I appreciate the response but if this is what you have in mind I didn't > get anything different. &

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
e the option of paging back and forth between the plots. > > On Mon, Jun 9, 2008 at 5:02 PM, Ken Spriggs <[EMAIL PROTECTED]> wrote: > >> >> Hello, >> >> This code works fine but is so fast I can't see anything but the last >> plot. >> >

Re: [R] Plot timer in a for loop

2008-06-10 Thread Ken Spriggs
I appreciate the response but if this is what you have in mind I didn't get anything different. Any ideas why? for (i in nrow(Volumes)){ plot(as.numeric(deltas[i,])) Sys.sleep(0.5); } Thanks Jan T. Kim wrote: > > On Mon, Jun 09, 2008 at 02:02:01PM -0700, Ken Spriggs wrote: &

[R] Plot timer in a for loop

2008-06-09 Thread Ken Spriggs
Hello, This code works fine but is so fast I can't see anything but the last plot. for (i in nrow(X)){ plot(as.numeric(d[i,])) } I'd like to view a plot every 500 milliseconds, nrow(X) = 400. How? Thanks -- View this message in context: http://www.nabble.com/Plot-timer-in-a-for-loop-

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
What happens if you do > > stats::cor(x1,x2) > > ? > > > > Ken Spriggs wrote: >> I get the following: >> >>> cor >> function (x, y = NULL, use = "all.obs", method = c("pearson", >> "kendall", "spearman&q

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
mplete.obs") Does it too. > > - > cuncta stricte discussurus > - > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Ken Spriggs > Gesendet: Wednesday, February 27, 2008 4:34 PM > An: r-help@r-project.org &

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
Thanks. > find("cor") [1] "package:fUtilities" "package:stats" Rolf Turner-3 wrote: > > > On 28/02/2008, at 11:11 AM, Ken Spriggs wrote: > >> >> I get the following >> >>> class(x1) >> [1] "numeric"

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
? Perhaps your calling > of the cor function is not calling the cor function in the stats package? > > > > Ken Spriggs wrote: >> Hello, >> >> I'm trying to do cor(x1,x2) and I get the following error: >> Error in cor.default(x1, x2) : missing observati

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
I get the following > class(x1) [1] "numeric" > class(x2) [1] "numeric" and: > cor(x1,x2) Error in cor.default(x1, x2) : missing observations in cov/cor > traceback() 2: cor.default(x1, x2) 1: cor(x1, x2) Peter Dalgaard wrote: > > Ken Spriggs wrote: &

[R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
Hello, I'm trying to do cor(x1,x2) and I get the following error: Error in cor.default(x1, x2) : missing observations in cov/cor A few things: 1. I've used cor() many times and have never encountered this error. 2. length(x1) = length(x2) 3. is.numeric(x1) = is.numeric(x2) = TRUE 4. which(is

Re: [R] When I cbind the POSIXct gets lost

2008-02-09 Thread Ken Spriggs
different classes. From ?cbind: > > "For the default method, a matrix combining the ... argument. The > type of a matrix result determined from the highest type of any of the > inputs in the hierarchy raw < logical < integer < real < complex < > character <

Re: [R] When I cbind the POSIXct gets lost

2008-02-09 Thread Ken Spriggs
tttt.1 > 1 2000-01-01 12:00:00 2000-01-01 12:00:00 > 2 2000-02-01 12:00:00 2000-02-01 12:00:00 > 3 2000-03-01 12:00:00 2000-03-01 12:00:00 > > > On Feb 8, 2008 4:59 PM, Ken Spriggs <[EMAIL PROTECTED]> wrote: >> >> I would lik

[R] When I cbind the POSIXct gets lost

2008-02-08 Thread Ken Spriggs
I would like to create a new dataframe from the DateTime column of an existing dataframe and a numeric vector. When I do cbind(x[,1], y) the result is: [1,] 1199370600 12.500 [2,] 1199371200 69.375 [3,] 1199371800 23.750 where the first column you see used to look like: "2008-01-03

Re: [R] Some simple questions about neural networks

2008-01-14 Thread Ken Spriggs
Have you ever gotten any response from this post? I have similar questions regarding the AMORE package. Efferz wrote: > > Hi, > > > > I have some "simple" questions and annotations about neural networks: > > > > 1) Which R-package (or which software) would you use to train and valid

Re: [R] The R book

2008-01-14 Thread Ken Spriggs
I just looked at "The R Book" book for the first time and am wondering where the code and errata is on the internet. I've found the code for the examples for Crawley's other book "Statistics: An Introduction using R". Is the example code for the new book not available? Anyone know? Tom Back