Re: [R] How to assign text string as object?

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Sun, 16 Mar 2008 20:00:11 -0300

You can try this also:

sapply(DF[-match("AGE", names(DF))], plot, x=DF$AGE)

On 16/03/2008, Ing. Michal Kneifl, Ph.D. <xkneifl_at_mendelu.cz> wrote:
> I have a problem I cannot get over for a long time. Imagine I have a
> data frame with 17 colums. 16 of them are craniometric variables of
> Cervus elaphus and one contains age.
> The data frame has 83 rows.
> I want to write a loop which plots the values of each craniometric
> variable against the age. The names of columns are V1, V2, V3, etc...
> What I have done till now was writing this:
>
> layout(matrix(1:16,4,4))
> plot(V1~AGE)
> plot(V2~AGE)
> .
> .
> .
> .
> etc.
> How to assign a string in the loop so that the program understands it
> is an object?
> Thank for your help in advance.
>
> Michael
>
> ______________________________________________
> R-help_at_r-project.org 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.
>

--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_r-project.org 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.
Received on Sun 16 Mar 2008 - 23:05:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Mar 2008 - 01:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive