[R] fast way to check an object is a member of a list?

Ko-Kang Kevin Wang Ko-Kang at xtra.co.nz
Wed Nov 20 10:51:09 CET 2002


Hi,

Is this what you want?
  > x <- 1:10
  > is.list(x)
  [1] FALSE
  > foo <- list(x = 1:10, y = 11:20)
  > is.list(foo)
  [1] TRUE
i.e. use is.list()

Cheers,

Kevin

------------------------------------------------
Ko-Kang Kevin Wang
Post Graduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
www.stat.auckland.ac.nz/~kwan022

----- Original Message -----
From: "Francisco J Molina" <fjmolina at lbl.gov>
To: "R-help" <r-help at stat.math.ethz.ch>
Sent: Wednesday, November 20, 2002 10:38 AM
Subject: [R] fast way to check an object is a member of a list?


>
> Is there any fast way to check that an object is a member of a list?
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
>


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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