[R] Connect to internet

2009-12-15 Thread bergarog
Hi Another way is to set the following environmental variable in windows and use standard internet in R. Variable name: http_proxy Variable value: ...eg http://web.yourproxy.com:8080 Best regards, Roger [[alternative HTML version deleted]] ___

[R] How to define new operators

2009-12-18 Thread bergarog
Dear R community I try to create a new operator to build a special sum of two CashFlows. (my S4 Class) I tried the following but this is actually not what I want. setGeneric("++",function(e1,e2)standardGeneric("++")) setMethod("+",signature=list("CashFlow","CashFlow"),function(e1,e2){ print("

[R] Reading multiple Input Files

2009-12-21 Thread bergarog
Hi I'm not sure if I understood your problem correctly.. Perhaps you are looking for something like this? Best regards, Roger Result <- c() yourPath <- "c:\\temp" filesInDir <- dir(yourPath) for(file in filesInDir){ fileInfo <- paste(yourPath,file,sep="\\") tmp <- read.csv(fileInfo) # assign(fi

[R] "diag", "diag<-" and "[" , "[<-"

2010-01-07 Thread bergarog
Dear all I have the following problem. M <- matrix(0,3,3) # dimension of M is dinamic and this can lead to the next subscript diag(M[1,1]) <- rep(100,1) #Error in `diag<-`(`*tmp*`, value = 100) : # only matrix diagonals can be replaced diag(M[1,1,drop=F]) <- rep(100,1) #Error in diag(M[1, 1, d