# NOT RUN {
# Empty input reverts to default.
x <- nroRcppVector(data=NULL, default=NA, empty=TRUE)
print(x)
# Empty input reverts to default, then to specified type.
x <- nroRcppVector(data=NULL, default=123, empty=TRUE, numeric=FALSE)
print(x)
# Convert a logical vector to numbers.
x <- c(TRUE, TRUE, FALSE, TRUE)
names(x) <- c("a","b","c","d")
y <- nroRcppVector(data=x, numeric=TRUE)
print(y)
# }
Run the code above in your browser using DataLab