Re: [R] Clean up a complex variable

2009-05-22 Thread andyer weng
Dear all, I need to clean up one variables in a dataset. e.g. lets say the dataset is "trial", the variable for cleaning up is "V1" >trial$V1 [1] 0(a=1) 0(b=1) 0.133(b=1) 0.555(a=1) >5.32(a=1) what i need to do is to remove the text (a=1) and (b=1) and the ">" in the V1, and then convert to a

Re: [R] Categorical Response Query

2008-10-20 Thread andyer weng
Hi all, I have a queston about Categorical response. i have a data frame containing age, sex, class, success(1=success, 0=non sucess). age, sex,class are the explantory variables, and sucess is the response variable. and i can get n (the nunber of times each age occurs) and r (the number of suce

[R] Fwd: Categorial Response Questions

2008-10-17 Thread andyer weng
: 8, 6 please advise what I have done wrong? why the error message come up. Am I doing the right thing to fix the question i mentioned in the first email (the bottom email)? Cheers. Andyer -- Forwarded message -- From: andyer weng <[EMAIL PROTECTED]> Date: 2008/10/18

[R] Fwd: Categorial Response Questions

2008-10-17 Thread andyer weng
ft) : + not meaningful for factors 2: In Ops.factor(left) : + not meaningful for factors thanks millions. Regards, Andyer -- Forwarded message -- From: andyer weng <[EMAIL PROTECTED]> Date: 2008/10/18 Subject: Fwd: Categorial Response Questions To: r-help@r-project.org Sorr

[R] Fwd: Categorial Response Questions

2008-10-17 Thread andyer weng
further more, my purpose for below questions is to assessthe effect of class, age and sex on the survival. Cheers. -- Forwarded message -- From: andyer weng <[EMAIL PROTECTED]> Date: 2008/10/18 Subject: Fwd: Categorial Response Questions To: r-help@r-project.org Sorry G

[R] Fwd: Categorial Response Questions

2008-10-17 Thread andyer weng
ers Andyer. -- Forwarded message ------ From: andyer weng <[EMAIL PROTECTED]> Date: 2008/10/18 Subject: RE:Categorial Response Questions To: r-help@r-project.org Hi All, I have a data set containing : pclass: A factor giving the class of the passenger: one of 1st, 2nd, 3rd. ag

Re: [R] Categorial Response Questions

2008-10-17 Thread andyer weng
Hi All, I have a data set containing : pclass: A factor giving the class of the passenger: one of 1st, 2nd, 3rd. age The age of the passenger in years. sex Passenger's gender: female or male age.group Passengers age group, one of 0‐9 , 10‐19, 20‐29, 30‐39, 40‐49, 50‐59, 60‐69, 70‐79 survived Pass

Re: [R] Help on R Coding

2008-10-04 Thread andyer weng
Hi all, I am kind of stuck of using Predict function in R to make prediction for a model with continuous variable and categorial variables. i have no problem making the model, the model is e.g. cabbage.lm2<- lm(VitC ~ HeadWt + Date + Cult) HeadWt is a continuous variable, Date and Culte are fac

Re: [R] Help on R Coding

2008-10-04 Thread andyer weng
Hi all, I am kind of stuck of using Predict function in R to make prediction for a model with continuous variable and categorial variables. i have no problem making the model, the model is e.g. cabbage.lm2<- lm(VitC ~ HeadWt + Date + Cult) HeadWt is a continuous variable, Date and Culte are fac