Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getFields.Object

Returns the field names of an Object


Description

Returns the field names of an Object.

Usage

## S3 method for class 'Object'
getFields(this, private=FALSE, ...)

Arguments

private

If TRUE, private fields will also be returned, otherwise only public fields are returned.

...

Not used.

Value

Returns a character vector of field names.

Author(s)

Henrik Bengtsson

See Also

To check if a field exists or not, see *hasField(). For more extensive information about the fields in an Object see *ll(). For more information see Object.

Examples

obj <- Object()
  obj$x <- 1:100
  obj$y <- 100:1
  getFields(obj)

  ## Not run: 
  gives:

  [1] "x" "y"
  
## End(Not run)

R.oo

R Object-Oriented Programming with or without References

v1.24.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.