Skip to content

write_xpt() gives confusing error for invalid dataset names #408

@ajdamico

Description

@ajdamico

line to reproduce:

haven::write_xpt( mtcars , paste0( tempfile() , " space.sas7bdat" ) )

the " " in the filepath causes the error, but the writing failure message incorrectly says there's a column name problem

Error in write_xpt_(data, normalizePath(path, mustWork = FALSE), version = version,  : 
  Writing failure: A provided column name contains an illegal character (must be a letter, number, or underscore).

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions