Re: [R] standardized regression coefficients

2012-02-15 Thread Jo Reynaerts
Hi David This should do the trick: data <- cbind(height, sex, age) data.scaled <- data.frame(apply(data, 2, scale)) fit.scaled <- lm(height ~ age + sex - 1, data = data.scaled) summary(fit.scaled) HTH Jo == Hello

Re: [R] How to use 'prcomp' with CLUSPLOT?

2011-11-04 Thread jo
ps://svn.r-project.org/R-packages/trunk/cluster/R/plotpart.q I am trying to figure that out now... FYI, as a test set, one could just delete columns until they are <= to the number of rows... clusplot has some nice extras, but I am also looking at just plotting w/pca... Thank you again, Jo

Re: [R] How to use 'prcomp' with CLUSPLOT?

2011-11-03 Thread Jo Frabetti
lt(x, scores = TRUE, cor = ncol(x) != 2) : 'princomp' can only be used with more units than variables Thank you for R and any assistance you may offer! Jo [[alternative HTML version deleted]] __ R-help@r-project.org mailing lis

[R] How to use 'prcomp' with CLUSPLOT?

2011-11-03 Thread Jo Frabetti
lt(x, scores = TRUE, cor = ncol(x) != 2) : 'princomp' can only be used with more units than variables Thank you for R and any assistance you may offer! Jo [[alternative HTML version deleted]] __ R-help@r-project.org mailing lis

[R] Multiple comparison test split plot analysis in R

2009-10-26 Thread Jo Stringer
How do I multiple comparison tests of the main plot factor, subplot factor and interaction? I cannot see how to do this using TukeyHSD and use the correct error term. Thanks Regards Jo Joanne Stringer Senior Biometrician BSES Limited Postal Address: PO Box 86 Street Address: 50 Meiers R

[R] (no subject)

2009-10-19 Thread Reynaerts, Jo
using x.in. I used different stopping rules and tolerance levels, but this gives the same result. As I said, I think it's a numerical problem. Has anyone had similar experiences using optim() and could you give some coding advice? Thanks in advance, Jo Reynaerts

Re: [R] No funtions for character code?

2009-10-13 Thread You Hyun Jo
Thnaks a lot! Could you recommend a manual or book or something for string manipulation in R, or give me a direction where I can get a list of string manipulation functions? hyunjo I 2009/10/14 Duncan Murdoch > On 13/10/2009 6:44 PM, You Hyun Jo wrote: > >> Hello, >>

[R] No funtions for character code?

2009-10-13 Thread You Hyun Jo
Hello, Do you have a function returns codes of given characters? Best Regards, hyunjo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:

Re: [R] Is there any performance difference between subset() and list comprehension?

2009-09-26 Thread You Hyun Jo
> 0.5, V2)$V2, gcFirst=T) user system elapsed 26.678 0.004 26.678 > system.time(df[df$V1>0.5, "V2"], gcFirst=T) user system elapsed 0.060 0.000 0.057 > system.time(df$V2[df$V1>0.5], gcFirst=T) user system elapsed 0 0 0 2009/9

[R] Is there any performance difference between subset() and list comprehension?

2009-09-25 Thread You Hyun Jo
Hello, Suppose that you have a data frame 'df' with variables 'V1', 'V2', 'V3', etc. Is there any (performance) difference (except the difference of the return types) between the following two computations? subset(df, V1 > 0, V2) and df$V2[df$V1 > 0] Best Regards, hyunjo [[alternati

[R] Constructing variables conditional on two indicators

2009-09-11 Thread Reynaerts, Jo
is then added to the data frame (and is the same for all rows with the same m indicator). How can I program this efficiently without running loops? Thanks in advance Jo Reynaerts Ph.D. student LICOS Centre for Institutions and Economic Performance Katholieke Universiteit Leuven Debériotstraat

Re: [R] Merge data frames but prefer values in one

2009-09-10 Thread jo
Thanks for the post-processing ideas. But is there any way to do that in one step? On Thu, Sep 10, 2009 at 7:20 PM, Henrique Dallazuanna wrote: > > Try this: > > xy <- merge(x, y, by = c("a","b"),all = TRUE) > xy$c <- ifelse(rowSums(!is.na(.x <- xy[, c('c.x', 'c.y')])) > 1, .x[,1], > rowSums(.x,

[R] MASS: lda collinearity

2009-08-25 Thread Jo Etzel
I am trying to understand what the lda function in the MASS package calculates when there are more dimensions than examples. It is my understanding that the Fisher Linear Discriminant is not applicable in this case, because the inverse of the covariance matrix cannot be calculated. My question

[R] Plotting two regression lines on one graph

2009-06-07 Thread Jo Stringer
graph. I have tried: graphics.off() plot(Aids ~ Year, data = aids) line(glm(Aids ~ Year, data=aids, family=poisson())) line(glm(Aids ~ Year+I(Year^2), data=aids, family=poisson())) but this does not work. Can anyone help me? Thanks Jo BSES Limited Disc