hasField.Object

0th

Percentile

Checks if a field exists or not

Checks if a field exists or not.

Keywords
methods, internal, programming
Usage
"hasField"(this, field, ...)
Arguments
field
vector of fields to be checked if they exists or not.
...
Not used.
Value

Returns a logical vector indicating for each field if it exists or not.

See Also

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.

Aliases
  • hasField.Object
  • Object.hasField
  • hasField,Object-method
Examples
  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)
Documentation reproduced from package R.oo, version 1.20.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.