[R] Trouble retrieving data (.xls) from folder on my computer.

2009-10-29 Thread tobiasfa
Using gdata on windows and im having trouble to retrieve an excel file from a folder on my computer. This is my dummy: R > download.file("http://people.su.se/~lundh/data/cpi_kpix.rda";, + "cpi_kpix.rda") R > URL <- "http://people.su.se/"; R > PATH <- "~lundh/data/" R > FILE <- "cpi_kpix.rda" R >

Re: [R] Trouble retrieving data (.xls) from folder on my computer.

2009-10-29 Thread tobiasfa
ls("myfile.xls") # if its in current directory > > xls <- read.xls("/path/to/myfile.xls") # to specify path > > xls <- read.xls(file.choose()) # use explorer style interface to choose > > > > > On Thu, Oct 29, 2009 at 9:36 AM, tobiasfa &

Re: [R] Trouble retrieving data (.xls) from folder on my computer.

2009-10-29 Thread tobiasfa
How do i make sure perl is in my PATH, and if its not how do i put it there? Either make sure that perl is on your PATH or if the path/filename you specified is correct then try with backslashes just in case: "C:\\perl\\bin\\perl.exe" Also check the upper/lower case of each component of your

[R] test for causality

2009-11-16 Thread tobiasfa
Hi useRs.. I cant figure out how to test for causality using causality() in vars package I have two datasets (A, B) and i want to test if A (Granger)cause B. How do I write the script? I dont understand ?causality. How do I get x to "contain" A and B. Further using the command VAR() to specify x

[R] Subscript out of bounds

2009-11-24 Thread tobiasfa
Hi! Trying to make a forecast, and get the following error message: Error in NextMethod("[<-") : subscript out of bounds The script is as follows: > Forecast.A <- ts(matrix(NA, nrow=25, ncol = 1, + dimnames = list(c(), c("Outcome"))), + start = c(2006, 10), frequency = 12) > for (i in 1:25) {

[R] Need help with for loop in forecast

2009-11-30 Thread tobiasfa
Hi I have a ts from 1980:1 trough 2009:9 with a frequency of 12. I want to make 25 6 month forecast where the first 6 month forecast is between 2007:4 - 2007:9 and the last 2009:4 - 2009:9. My script: Forecast <- list() for (i in 1:25){ j <- i + 326 Data <- window(omxr, end = time(omxr)[j]) Res

[R] Function for MFE and MSFE

2009-12-06 Thread tobiasfa
Hello, Is there a function that calculates MFE(Mean Forecast Error) and MSFE(Mean Square Forecast Error) in R? Cant find anything! Thanks Tobias -- View this message in context: http://n4.nabble.com/Function-for-MFE-and-MSFE-tp950368p950368.html Sent from the R help mailing list archive at Nab