[R] Problem understanding behaviour of mmap package

2011-12-23 Thread Wolfgang Wu
wing code that the  mmapData$filedesc doesn't show the filename I specified in cFile. Is this not how it is supposed to be used? cFile <- 'C:/temp/testmapfile' dfrData <- data.frame(matrix(data=1, ncol=2, nrow=10)) mmapData <- as.mmap(dfrData, file=cFile) mma

Re: [R] Append data to vector form a column of a dataframe

2011-10-12 Thread Wolfgang Wu
In addition to Ivan, test$a is not a data.frame anymore but a numerical vector. > class(test$a) [1] "numeric" > test$a [1] 1 2 3 So adding a row to your data.frame would be  > rbind(test, 2)   a 1 1 2 2 3 3 4 2   Wolfgang Wu - Ursprüngliche Message - Von: Ivan Cal

[R] Problem with pmax and matrix to calculate row maxima

2011-10-12 Thread Wolfgang Wu
runif(n=30), ncol=3); >system.time(test <- pmax(matRandom[,1], matRandom[,2], matRandom[,3]))    user  system elapsed     0.02    0.00    0.02  >system.time(test <- apply(matRandom, 1, max)) >    user  system elapsed     2.37    0.00    2.38 Thanks f

Re: [R] R and Forex

2011-10-12 Thread Wolfgang Wu
The quantmod package might be a good start.  http://cran.r-project.org/web/packages/quantmod/index.html Regards,   Wolfgang Wu - Ursprüngliche Message - Von: Yves S. Garret An: r-help@r-project.org Cc: Gesendet: 2:29 Mittwoch, 12.Oktober 2011 Betreff: [R] R and Forex Hi all

[R] More effective calculation for loop

2011-05-13 Thread Wolfgang Wu
] + xtsBuy[i-1] - xtsSell[i-1]; } print(Sys.time())#-- Thank you very much in advance! Best regards, Wolfgang Wu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin