Re: [R] two questions for R beginners

2010-03-04 Thread David A.G
To me, as a biologist recycled to biostats, I have always worked with Excel and then SPSS and moving to R was difficult (and still is, since I am still learning). Being a self-taught person, I learn R looking for examples in Google, which many times takes me to Rwiki or other. I sometimes post

[R] 3D plot

2010-02-18 Thread David A.G
Dearl list, can anyone point me to a function or library that can create a graph similar to the one in the following powerpoint presentation? http://bmi.osu.edu/~khuang/IBGP705/BMI705-Lecture7.ppt (pages 36-37) In order to try to explain the graph, the way I see it in R terms is something li

[R] Hmisc improveProb() function

2009-07-20 Thread David A.G
Dear list, I am trying to work out how the improveProb() function works and how to interpret the results, and I have a few questions. I would be grateful if anyone could shed some light on these. in the Net Reclassification Improvement section of the output, is the 2P column the two-sided p-v

[R] calibration curve options

2009-06-09 Thread David A.G
Hi R-users, can anyone explain me how to play around with the options of the bootstrap calibration curve obtained using the calibrate() function in Design package? I am trying to colour the diagonal, i.e. the ideal curve, in red, and also hide the bias-corrected curve. Thanks, Dave

[R] help with plot.boot

2009-06-08 Thread David A.G
Dear list, this might be a silly question, but I am a bit lost I have bootstrapped the C-index of a logistic regression model, 500 times. > results <- boot(data=data,statistic=cindex,R=500,formula = myformula) When I plot the results I get a histogram of the bootstrapped where the Y axis is

[R] plot.boot

2009-06-04 Thread David A.G
Dear list, I have bootstrapped the C-index of a logistic regression model, 500 times. > results <- boot(data=data,statistic=cindex,R=500,formula = myformula) When I plot the results I get a histogram of the bootstrapped where the Y axis is density, but it spans from 0 to about 25 > plot(res

[R] error glmpath()

2009-05-19 Thread David A.G
Hi R-users! I am trying to learn how to use the glmpath package. I have a dataframe like this > dim(data) [1] 605 109 and selected the following > response <- data[,1] > features<-as.matrix(data[,3:109]) > mymodel <- glmpath(features,response, family = binomial) Error in if (lambda <= min.lam

Re: [R] Sum of character vector

2009-03-30 Thread David A.G
sum( data[ , 1 ] == "GG", na.rm = TRUE ) Regards 2009/3/30 David A.G Dear list, I am trying to evaluate how many elements in a vector equal a certain value. The vectors are the columns of a data.frame, read in using read.table(): > dim(data) [1] 2600 ¨¢742 > data[

[R] Sum of character vector

2009-03-30 Thread David A.G
Dear list, I am trying to evaluate how many elements in a vector equal a certain value. The vectors are the columns of a data.frame, read in using read.table(): > dim(data) [1] 2600 742 > data[1:5,1:5] SNP001 SNP002 SNP003 SNP004 SNP005 1 GG AA TT TT GG 2 GG AA