[R] Error in match.names(clabs, names(xi))

2011-04-05 Thread Quan Zhou
Hi Guys, I have this part of a program: library(survival) Gastric - cbind.data.frame(Gp=c(rep(1,45),rep(0,45)), ### 2nd gp 0 time=c(1,63,105,129,182,216,250,262,301,301,342,354,356,358, 380,383, 383,388,394,408,460,489,499,523,524,535,562,569,675,676,

[R] index of sort

2011-03-26 Thread Quan Zhou
Hi How can I return the index of sort, when I use R function sort? or any other sorting functions in R For example, I sorted a vector, but R just return the sorted value without giving me the original index of these data. Thanks a lot. [[alternative HTML version deleted]]

[R] how to store a number into a vector

2011-01-23 Thread Quan Zhou
Hi Everyone, A quick question how to store a number like 12345 to a vector or array with size(1,5), like 1, 2, 3, 4, 5 So I can compare if the last three digits of this number is the same with some other numbers. Thanks a lot [[alternative HTML version deleted]]

Re: [R] how to do linear regression when dimension is high

2010-11-17 Thread Quan Zhou
Thanks! it worked. this forum is so powerful! On Tue, Nov 16, 2010 at 12:20 PM, Douglas Bates ba...@stat.wisc.edu wrote: On Tue, Nov 16, 2010 at 10:30 AM, poko2000 quan.poko2...@gmail.com wrote: Hi I am a newbie in R. I have data with dim of 20. How to use lm if i want to do regression