Re: [R] two newbie questions

2008-06-22 Thread Donald Braman
Wow -- many thanks for the mind-*expanding* help! I'm really impressed by R's ability to handle this so concisely It's going to take me a while to get used to applying things to vectors, but the more I understand, the nicer R looks. On Sun, Jun 22, 2008 at 6:59 PM, jim holtman <[EMAIL PROTECTED

Re: [R] two newbie questions

2008-06-22 Thread jim holtman
This does away with the 'for' loops and uses 'expand.grid' to create the combinations. I think I got the right variables substituted: my.df <- data.frame(replicate(10, round(rnorm(100, mean=3.5, sd=1 var.list <- c("dv1", "dv2", "dv3", "iv1", "iv2", "iv3", "iv4", "iv5", "intv1", "intv2") names

[R] two newbie questions

2008-06-22 Thread Donald Braman
# I've tried to make this easy to paste into R, though it's probably so simple you won't need to. # I have some data (there are many more variables, but this is a reasonable approximation of it) # here's a fabricated data frame that is similar in form to mine: my.df <- data.frame(replicate(10, rou