R.oo (version 1.0.3)

hasField.Object: Checks if a field exists or not

Description

Checks if a field exists or not.

Usage

## S3 method for class 'Object}(this, field, ...)':
hasFieldundefined

 field{vector of fields to be checked if they exists or not.}
   ...{Not used.}

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

 obj <- Object()
   obj$x <- 1:100
   obj$y <- 100:1
   hasField(obj, c("x", "a", "b", "y"))

   gives:
 
   [1] TRUE FALSE FALSE TRUE

 [object Object]

 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.

 programming
 methods

Arguments