vector_R-class: A class that facilitates returning R vectors via a list in...

Description Slots References Examples

Description

Server language code will return a dictionary in which data= is a JSON-style list and type= is the R vector type desired. See the asRObject() method documentation. Objects from this class can also be generated in R, usually supplying just data and generating the other slots from that object's properties.

Slots

data

The actual vector data.

type

The string for the R type intended. In spite of the slot name, this really the class; for example, "numeric" rather than "double".

missing

The index of NA's in this vector. Needed because most server languages only treat 'NaN' for doubles and have no mechanism for 'NA' in other types.

References

Chambers, John M. (2016) Extending R, Chapman & Hall/CRC. ( Chapter 13, discussing this package, is included in the package: ../doc/Chapter_XR.pdf.)

Examples

1
2
x <- c(1:2,NA,4:5)
vector_R(x)

johnmchambers/XR documentation built on May 19, 2019, 5:15 p.m.