Re: [R] Reading PDF files

2012-11-21 Thread saskay
Thank you, Tony. Even in 2012, I still found your post useful. -- View this message in context: http://r.789695.n4.nabble.com/Reading-PDF-files-tp977248p4650374.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] SPLS does not output probabilities for predicted classes.

2012-03-25 Thread saskay
Hi, I was using SPLS package to do multi-class classification and would require probabilities to be output for each class. In the vignette, the documentation does say that you can output probabilities by requesting fit.type = response, however I still only get predicted classes, rather than the

Re: [R] randomForest2Rules

2012-02-27 Thread saskay
Hi, The work around this is to use printRandomForests function in Rattle package. It outputs the forest in the form of rules. For ex: #Load libraries library(rattle) library(randomForest) #Load sample data data(iris) #Build a forest iris.rf - randomForest(Species ~ ., data=iris,

[R] randomForest2Rules

2011-09-18 Thread saskay
Hi, I'm trying to extract the rules from every tree in the random forest model that I've created. I've used randomForest2Rules function from rattle package however I get an error Error in if (var.class == character | var.class == factor) { : argument is of length zero Sample code:

Re: [R] special question on regression

2011-07-17 Thread saskay
You could treat the dependent variable as a nominal variable. And scale the indepent variables to have a Mean:0 and StDev:1. Stick all these in a multinomial regression package such as mlogit. Or a non -parametric method such as randomForest. -- View this message in context:

Re: [R] Querying RData Files, SQL style?

2011-07-16 Thread saskay
No, you do not need to install anything except the SQLDF package. I've used it to do joins on Rdataframe. It worked well for me. -- View this message in context: http://r.789695.n4.nabble.com/Querying-RData-Files-SQL-style-tp3670111p3671686.html Sent from the R help mailing list archive at

Re: [R] Executing a function correctly

2011-07-15 Thread saskay
Marc, Many thanks. -- View this message in context: http://r.789695.n4.nabble.com/Executing-a-function-correctly-tp3665765p3670602.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] foreach not recognizing functions in memory

2011-07-13 Thread saskay
Try the below code: == library(foreach) library(doSNOW) getDoParWorkers() getDoParName() registerDoSNOW(makeCluster(2, type = SOCK)) getDoParWorkers() getDoParName() testFun - function(m) { out - m*m } out - foreach(m=1:10, .combine=rbind,*.verbose=T*) %dopar%

[R] Executing a function correctly

2011-07-13 Thread saskay
Hello All, I've created a function as follows so as to use it in a loop. freq-function(i) { library(RODBC) paste(i,-sqlQuery(conn,,',select click_flg, open_flg,, i , from modeling_5'),sep=) } freq(i=AQI) [1] AQI-sqlQuery(conn,'select click_flg, open_flg,AQI from modeling_5') What I was

[R] missForest to impute missing values

2011-06-27 Thread saskay
Hi, I have a 1,785,421 rows x200 variables dataset with some missing values. Approximately 55% of 1,785,421x200 are missing cells. In this ftp://ftp.stat.berkeley.edu/pub/users/breiman/Using_random_forests_v4.0.pdf document , it is claimed that random forests can impute with great accuracy even