| xpt_validate | R Documentation |
Function used to validate dataframes before they are sent to
haven::write_xpt for writing.
xpt_validate(data)
data |
Dataset to be exported as xpt file |
xpt_validate() performs four focused checks before
xportr_write() attempts to create an XPT file:
Variable names – maximum of 8 characters, must start with a letter, use only ASCII alphanumeric characters (no underscores or symbols), and remain uppercase.
Variable labels – maximum of 40 characters and limited to ASCII printable characters.
Formats – SAS format attributes must match the internal allow-list or
follow a w.d pattern such as 8. or 12.3.
Character data lengths – each character column's maximum byte length cannot exceed 200.
Returns a character vector of failed conditions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.