Skip to content

write_dta limits you to 31 character column names even though Stata allows 32 character names #605

@jacobkap

Description

@jacobkap

In Stata the maximum number of characters that a column name may have is 32 characters (https://www.stata.com/manuals/r.pdf#rLimits). write_dta checks the length of each column name if there is a name >31 characters, but since 32 characters is allowed this should be >32 or >=31.

library(haven)
example <- data.frame(name_that_is_32_characters_long_ = 1)
write_dta(example, "example.dta")

example <- data.frame(name_that_is_31_characters_long = 1)
write_dta(example, "example.dta")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions