[R] errorest slow

2013-06-20 Thread David martin
Hi , When using errorest on a large dataset (12000 variables) it performs very slow. By looking at the randomforest package it says that for largedatasets the use of the formula is discouraged. So it's better to use the x and y terms as the example below: rf<-randomForest(x=df[trainindices,-1]

[R] Median abline how-to ?

2010-08-12 Thread David martin
Hi, I'm newbie with R and don't really know how to add a median line to each of the groups that is not all the plot long. Here is a small working code that i have adapted for my purpose. If somebody could tell me how to draw median lines on each group and not all plot long. ctl <- c(4.17,5

Re: [R] Median abline how-to ?

2010-08-12 Thread David martin
thanks !!! On 12/08/10 17:49, William Dunlap wrote: segments(x0=ix-w, x1=ix+w, y0=mediansByGroup, col=ix) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/post

[R] Factors to Columns

2011-05-20 Thread David martin
> str(data) 'data.frame': 250 obs. of 3 variables: $ student: chr "A" "B" "C" "D" ... $ data : num 20.2 20.4 22.5 22.1 23.3 ... $ param : Factor w/ 4 levels "AGE","SCHOOL",..: 1 1 1 1 1 1 1 1 1 1 Hi , i would like to split the dataframe so that each level of param is a column At th

Re: [R] Factors to Columns

2011-05-20 Thread David martin
24.1 33 22.0 23.5 24.4 44 23.3 22.8 23.2 55 23.1 25.3 22.4 66 22.5 31.4 27.1 77 21.8 18.8 24.6 88 23.9 23.0 24.8 99 25.2 28.0 22.5 10 10 22.8 21.5 21.3 HTH, Dennis On Fri, May 20, 2011 at 2:49 AM, David martin w

[R] R and multithread

2011-04-06 Thread David martin
Hello, Sorry if this question has been posted before but could't find out exactly an answer to the question I'm doing bioinformatics and doing small RNA sequencing that make use of packages such as DESeq and EDGE. For those familiar with this data you will notice that you end up having la

[R] text overlap in plot

2011-06-24 Thread David martin
Hey, Here is a snippet that generated a boxplot and separates points so that they do not overlap. I have a problem to avoir text overlapping. Any help would be helpful. > attach(InsectSprays) boxplot(count ~ spray, data = InsectSprays, outpch = NA) stripchart(count ~ spray, data = InsectSpray

[R] StepAIC and boxplot

2011-11-18 Thread David martin
Hello, I have done a stepwise analysis to determine the best model fitting my data. data <- stepAIC( aov (Group)~ . , data=mydata) data > summary(data) Df Sum Sq Mean Sq F valuePr(>F) `a` 1 1.9829 1.98290 11.176 0.0011824 ** `b` 1 2.6606 2.66064 14.996 0.0001967 ***

[R] stepAIC

2011-11-21 Thread David martin
Hi, I'm trying to select the best model for a particular problem. So far i have managed to identify a set of variables that woudl explain my model lm1 <- lm(Group ~ . , data=dataf)) > summary(lm1) Df Sum Sq Mean Sq F valuePr(>F) `A` 1 2.3963 2.3963 24.0390 7.328e-06

[R] randomforest and AUC using 10 fold CV - Plotting results

2011-12-22 Thread David martin
Here is a snippet to show what i'm trying to do. library(randomForest) library(ROCR) library(caret) data(iris) iris <- iris[(iris$Species != "setosa"),] fit <- randomForest(factor(Species) ~ ., data=iris, ntree=50) train.predict <- predict(fit,iris,type="prob")[,2] plot(performance(prediction(t

[R] exporting LDA model possible ?

2012-03-22 Thread David martin
Hi, is it possible to export the LDA model into a file so that it can be reused in R afterwards ? I have already checked the package "pmml" but does not seem to export LDA models. thanks, david __ R-help@r-project.org mailing list https://stat.eth

[R] boxplot with diamond shape

2012-01-16 Thread David martin
Hi, I haven't found in R a possibility to draw a boxplot with a diamond shape (means and CI). Does anyone know how to plot it ? thanks, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] boxplot with diamond shape

2012-01-16 Thread David martin
;ei=ySEUT_rlOMnsObn0rIQE&usg=AFQjCNFmhzo48CvMLH7YRFCXVPpoDmIfOg&cad=rja That would be be extremely useful to draw using the boxplot function. Hope helps. thansk, david On 01/16/2012 12:25 PM, Jim Lemon wrote: On 01/16/2012 10:07 PM, David martin wrote: Hi, I haven't found in R a possibili

[R] oddsratio epitool and chi-square

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna

[R] oddsratio and some basic help on epitools

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna

[R] epitools question

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna