hasField.Object | R Documentation |
Checks if a field exists or not.
## S3 method for class 'Object' hasField(this, field, ...)
field |
|
... |
Not used. |
Returns a logical
vector
indicating for each field if it exists or not.
Henrik Bengtsson
To get the fields of an Object, see *getFields()
.
For more extensive information about the fields in an Object see
*ll()
.
For more information see Object
.
obj <- Object() obj$x <- 1:100 obj$y <- 100:1 hasField(obj, c("x", "a", "b", "y")) ## Not run: gives: [1] TRUE FALSE FALSE TRUE ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.