Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread weix1
Dennis: points well taken. It seems to be important to investigate the nature of distribution. I might be too naive to assume a "emiprical probability distribution" will be simply calculated from a clound of data points... -- View this message in context: http://r.789695.n4.nabble.com/how-to

Re: [R] strange error msg from lapply and lm()

2010-05-03 Thread weix1
plus, it took long time to complete this analysis for only 24 records! Although I get the error msg, the result seems to be correct. -- View this message in context: http://r.789695.n4.nabble.com/strange-error-msg-from-lapply-and-lm-tp2124042p2124050.html Sent from the R help mailing list arch

[R] strange error msg from lapply and lm()

2010-05-03 Thread weix1
I am conducting a very simple t test for two genes using lapply (i try to avoid loop since i will have thousands of genes later on). however, I got strange error msg like the followings. It looks that R is complaining my factor has only one level, which is not the case (I check many times). > res

[R] how to parse out fitting statistics and write them into a data frame?

2010-04-29 Thread weix1
hello, everyone: I am conducting t test between drug and control for about 50,000 gene using the following syntax (treatment is factor): result<- lapply(split(data, data$gene),function(x) lm(value~treatment,x) however, the result is a list and i do not know whether more model fitting statis

[R] how to put \ in a string?

2010-04-23 Thread weix1
I have string as follows:"v:\work\gene" however, i can not write this as character string in R what i did is: path<- as.character("v:\work\gene") but it seems that \ is eliminated: Warning messages: 1: '\w' is an unrecognized escape in a character string 2: '\g' is an unrecognized escape in a c