Re: [R] Subsetting across a frame for plotting

From: Morten Sickel <Morten.Sickel_at_nrpa.no>
Date: Wed 22 Jun 2005 - 23:30:54 EST

 

Fra: r-help-bounces@stat.math.ethz.ch [mailto:r-help-bounces@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



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 Received on Wed Jun 22 23:34:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:56 EST