[R] list with number tags
Griffith Feeney
gfeeney at gfeeney.com
Thu Apr 5 21:55:18 CEST 2001
At 01:51 PM 4/5/01 -0400, Miguel.Mediavilla at CCPEDQ.desjardins.com wrote:
>
>Is it possible to create a list or a vector with tags being numbers?
>
>e.g. a <- list(1=2, 3=4)
Try and see!
> a <- list(1=2, 3=4)
Error: syntax error
So no. But
> a <- list("1"=2, "3"=4)
> a
$"1"
[1] 2
$"3"
[1] 4
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list