setClassUnion("numericORmissing",
c("numeric","missing"))
setClassUnion("characterORmissing",
c("character","missing"))
h5v_encode <- function(x, default_value, start_code) {
if(class(x) == "matrix") {
encode_FactorMatrix(x, default_value, start_code)
} else if(class(x) == "vector") {
encode_FactorVector(x, default_value, start_code)
}
}
h5v_decode <- function(x, default_value, start_code) {
if(class(x) == "matrix") {
decode_FactorMatrix(x, attr(x, levels))
} else if(class(x) == "vector") {
decode_FactorVector(x, attr(x, levels))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.