[R] data.frame subsetting

Douglas Bates bates at stat.wisc.edu
Thu Jul 24 17:20:22 CEST 2003


Still works for me in both 1.7.1 and 1.8.0 (in development)

> data(women)
> women[["height"]]
 [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
> women$height
 [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

Can you provide an example of how it is failing for you?


Dirk Repsilber <dirk.repsilber at gmx.de> writes:

> Hi,
> 
> is there advice how to subset a data.frame, where until R version
> 1.7.0 it was possible to write
> 
> 
>  > data[["subset"]]
> 
> which meant the same as
> 
>  > data$subset
> 
> (data is a data.frame). From 1.7.1 on this does not seem to work
> longer. Could there be a bug in downwards compatibility?
> 
> 
> sincerely yours
> 
> Dirk
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
Douglas Bates                            bates at stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/




More information about the R-help mailing list