template<class RC>
class rcontainer_optional : public xoptional_assembly_base<rcontainer_optional<RC>>, public xcontainer_semantic<rcontainer_optional<RC>>

Multidimensional container of optional values providing the xtensor container semantics to an R array.

rcontainer_optional is not meant to be used directly, but through the aliases rarray_optional<T> and rtensor_optional<T, N>.

Depending on the value type, optional values are reference proxies on R’s NA_INTEGER, NA_LOGICAL, NA_REAL, NA_STRING, or R_NilValue.

Besides support for optionality, rarray_optional and rtensor_optional are similar to the rarray and rtensor respectively, with respect to dynamic and static dimensionality.

Template Parameters
  • T: The type of the element stored in the rarray.