Re: [R] ROCR package question for evaluating two regression models

2011-09-04 Thread RockO
Hi Andra, I have been doing some ROC analysis for a new diagnosis test. I used the pROC package to assess thresholds and compare different diagnosis tests to a "gold standard". In your case, let say the gold standard are the observed values y0. Here is an example: y0 <- sample(0:1,50,replace=TRUE

Re: [R] How to apitalize leading letters & else of personal names?

2010-12-15 Thread RockO
David, Thank you very much! Indeed Capitalizing names is very tricky, particularly for people not having English -mother language (as I am). Hopefully, Using your script will much better than simply having names in uppercase. Happy Holidays! Rock -- View this message in context: http://r.7896

[R] How to apitalize leading letters & else of personal names?

2010-12-14 Thread RockO
Dear R world, Do you know about a function that would capitalize in the correct manner first and family names? I found in the cwhmisc only the CapLeading function, but it just does not do the job, taking care only to capitalize the first letter of a word. I am looking for a function that would r

Re: [R] factor

2010-05-20 Thread RockO
Try, ofr a factor: > x <-c("A","B","C") > x <- factor(x) > levels(x) [1] "A" "B" "C" > x <- factor(x,levels=levels(x)[c(3,2,1)]) > levels(x) [1] "C" "B" "A" Rock, DRF -- View this message in context: http://r.789695.n4.nabble.com/factor-tp879983p2224639.html Sent from the R help mailing list a

Re: [R] Read data in sequences

2010-04-11 Thread RockO
Gabor's elegant method works as well indeed where gl(number of factor level,number of replications): > data.frame(id = dat[gl(3,4),1], t(matrix(t(dat[-1]), 2))) Rock DRF-MRNF, Quebec -- View this message in context: http://n4.nabble.com/Read-data-in-sequences-tp1819487p1836285.html Sent from t

Re: [R] Read data in sequences

2010-04-11 Thread RockO
Hi, Thank you very much for your help! Here is the coding I used to make it work: x <- textConnection("A 2.5 3.4 2.7 5.6 5.7 5.4 10.1 9.4 B 5.3 5.4 6.5 7.5 1.3 4.5 10.5 4.1 C 2.1 2.3 2.1 5.4 9.0 4.5 20.1 3.7") dat <- read.table(x) nv <- 2 # Number of variables that are repe

[R] Read data in sequences

2010-04-09 Thread RockO
Dear R users, I tried to find a solution in the search list, but I cannot find it. I would like to read a .txt file with, let say, three variables, with two of which have repeated values in a number a columns. An example: The variables: Treat, x1, x2. The values: A 2.5 3.4 2.7 5.6 5.7 5.4 10.1