[R] Subsetting across a frame for plotting

Morten Sickel Morten.Sickel at nrpa.no
Wed Jun 22 15:30:54 CEST 2005


 

Fra: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] På vegne av Liaw, Andy

>You might save yourself some headaches by turning it into a matrix instead, since all the columns are either integer or numeric:
>tonedata <- data.matrix(tonedata)

>Data frames are really lists, so even when you get a one-row subset, it's still a one-row data frame.  You can use unlist() to turn 
>that into a vector.

>Andy

Great, Andy, thanks! unlist was what I was looking for. 

Morten




More information about the R-help mailing list