Re: [R] Loop over several Variables, add on question

2012-11-02 Thread bchr
Hey John, thanks for making me notice that document - I just skipped over it the past hour and I think I like that very condensed If you want to do this ->it works like that approach. Besides that I had the impression, though that it's content - while more strongly condensed - is basically not too

Re: [R] Loop over several Variables, add on question

2012-11-02 Thread bchr
Thanks very much Petr, that one did just fine! I just wanted to say that it's not that I did no reading at all (in fact I use a book called R for Stata users by Muenchen/Hilbe and another German book called Programming in R when you translate the title) - so yes I am aware that R works quite diff

Re: [R] Loop over several Variables, add on question

2012-11-02 Thread bchr
Hey Petr, thanks for answering. First to your question: I use rename from the reshape package. You are probably right to assume that I do not have a to extensive reading background in R - basically I had to dive right in (which probably isn't a good idea, but I could not change that). Having a s

[R] Loop over several Variables, add on question

2012-11-02 Thread bchr
Hey everyone, I have again a loop question: After generating the dataset using Jan’s approach from my previous posting (http://r.789695.n4.nabble.com/Loop-over-several-variables-td4648112.html) I want to rename the Variables in the new dataset so that all y will be called tiy. Doing it separately

Re: [R] Loop over several variables

2012-11-01 Thread bchr
Oh hey Jan, sorry, I just saw I did not read correctly and mistook your quote of Don's mail as a signature. So thank's to you for the second posting Bernhard -- View this message in context: http://r.789695.n4.nabble.com/Loop-over-several-variables-tp4648112p4648132.html Sent from the R help

Re: [R] Loop over several variables

2012-11-01 Thread bchr
Hey Don, I just saw your second post ... that's even better! Thanks again Bernhard -- View this message in context: http://r.789695.n4.nabble.com/Loop-over-several-variables-tp4648112p4648131.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Loop over several variables

2012-11-01 Thread bchr
Hey Don, many thanks, I tried that and it works just fine. I have two questions though: 1. In Addition to generating the t1-t5 (I have five iterations, in fact), the code will generate an additional ti(without subscript), which seems to be a copy of ti5. Is that what it should do ( and if yes, wh

[R] Loop over several variables

2012-11-01 Thread bchr
Hey everybody, I am looking for a way to loop commands over several variables in a dataframe. Basically I want to do something like this: ti1<-aggregate(dataframename$y1, by=data.frame(dataframename$aggregationvar), sum,na.rm=TRUE) This works fine as it is but i wan