Re: [R] Variable im Data Frame Namen
At 12:03 20/09/2006, Thorsten Muehge wrote: Hello R Experts, how can I incorporate a variable in a data frame definition? Thorsten, you have already had a reply about this, but I wonder whether you _really_ want to do this. You do not say what the scientific question is you are trying to answer, but I find that when I am tempted to do this it is almost always better to make a list (in your case of data frames) and then access the elements of the list Example: week - 28 test(week) - data.frame(a,b,s,c); test28 Michael Dewey http://www.aghmed.fsnet.co.uk __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Variable im Data Frame Namen
Hello R Experts, how can I incorporate a variable in a data frame definition? Example: week - 28 test(week) - data.frame(a,b,s,c); test28 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Variable im Data Frame Namen
assign(paste(week, 28, sep=), data.frame(a=1:2, b=3:4, cc=letters[5:6])) week28 a b cc 1 1 3 e 2 2 4 f __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.