Force an output dataset column as string with R.
davido
Registered Posts: 1 ✭✭✭✭
Hi,
How do you proceed to force a column detected as int in a R script to as string in output in order to preserve a specific format . Example : input = 06000 give an output dataset = 6000, and i would i input = 06000 which should give an output = 06000.
How do you proceed to force a column detected as int in a R script to as string in output in order to preserve a specific format . Example : input = 06000 give an output dataset = 6000, and i would i input = 06000 which should give an output = 06000.
Answers
-
Hi,
Good news, the latest version of DSS (3.1) now includes this feature.
You can either:
* Force the dataframe to respect the storage schema of the DSS dataset by using
dkuReadDataset("mydataset", inferColClassesFromData=FALSE)
* Force the col class for a set of columns:
dkuReadDataset("mydataset", colClasses=c(mycolumn = "character"))