-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
featurea feature request or enhancementa feature request or enhancement
Description
I need to process a .json containing logdata into a .dta file. The file itself contains a handful of string variables exceeding 5000 and more characters.
As Stata (since Stata 13) supports long string variables (strL variable) and haven() supports long string at least in write_sav() I wanted to ask if it is in any way possible to write strL-variables with haven (haven't found anything on this)? If not if there's support for this planned in the future?
Bests
library(haven)
longFun <- function(n) {
do.call(paste0, replicate(5000, sample(LETTERS, n, TRUE), FALSE))
}
longString <- data.frame(V1 = longFun(1), stringsAsFactors = F)
write_dta(longString, paste0(tempdir(), "\\longString.dta"))
#> Error in write_dta_(data, normalizePath(path, mustWork = FALSE), version = stata_file_format(version)): Writing failure: A provided string value was longer than the available storage size of the specified column.
ManuelNeumann, JackLandry, mpaulacaldas and alvarogutyerrez
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement