if (FALSE) {
# ds$v1 is of type Text
is.Text(ds$v1)
# [1] TRUE
# that has strings of numbers
as.vector(ds$v1)
# [1] "32" "8" "4096" "1024"
# convert this to a numeric variable with the alias `v1_numeric`
ds$v1_numeric <- as.Numeric(ds$v1)
# the values are the same, but are now numerics and the type is Numeric
as.vector(ds$v1_numeric)
# [1] 32 8 4096 1024
is.Numeric(ds$v1_numeric)
# [1] TRUE
# this new variable is derived, so if new data is appended or streamed, the
# new rows of data will be updated.
is.derived(ds$v1_numeric)
# [1] TRUE
}
Run the code above in your browser using DataLab