powered by
Obtain the data type of a container.
type(x)
A named character vector for CppMap, CppUnorderedMap, CppMultimap, and CppUnorderedMultimap objects. A character otherwise.
A cppcontainers object.
cppcontainers
The available types are integer, double, string, and boolean. They correspond to the integer, numeric/ double, character, and logical types in R.
print, sorting, to_r.
s <- cpp_set(4:6) type(s) # [1] "integer" m <- cpp_unordered_map(c("hello", "world"), c(0.5, 1.5)) type(m) # key value # "string" "double"
Run the code above in your browser using DataLab