Skip to content

Commit

Permalink
#12 Comment out call to xportr_write().
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyad committed Nov 4, 2023
1 parent 2380843 commit 707b466
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions adam/adpc.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ adpc <- adpc_prefinal %>%

## Apply Labels and Formats with xportr

Using `{xportr}` we check variable type, assign variable lenght, add variable labels, add variable formats, and save a transport file.
Using `{xportr}` we check variable type, assign variable lenght, add variable labels, add variable formats, and save a transport file. At the end you could add a call to `xportr::xportr_write()` to produce the XPT file.

```{r}
#| label: xportr
Expand All @@ -594,6 +594,7 @@ adpc_xpt <- adpc %>%
xportr_length(metacore) %>% # Assigns SAS length from a variable level metadata
xportr_label(metacore) %>% # Assigns variable label from metacore specifications
xportr_format(metacore) %>% # Assigns variable format from metacore specifications
xportr_df_label(metacore) %>% # Assigns dataset label from metacore specifications
xportr_write("adpc.xpt") # Write xpt v5 transport file
xportr_df_label(metacore) # Assigns dataset label from metacore specifications
# xportr_write("adpc.xpt") # Write xpt v5 transport file
```
7 changes: 4 additions & 3 deletions adam/adppk.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ adppk <- adppk_prefinal %>%

## Apply Labels and Formats with xportr

Using {xportr} we check variable type, assign variable lenght, add variable labels, add variable formats, and save a transport file.
Using {xportr} we check variable type, assign variable lenght, add variable labels, add variable formats, and save a transport file with `xportr::xportr_write()`.

```{r}
#| label: xportr
Expand All @@ -538,6 +538,7 @@ adppk_xpt <- adppk %>%
xportr_length(metacore) %>% # Assigns SAS length from a variable level metadata
xportr_label(metacore) %>% # Assigns variable label from metacore specifications
xportr_format(metacore) %>% # Assigns variable format from metacore specifications
xportr_df_label(metacore) %>% # Assigns dataset label from metacore specifications
xportr_write("adppk.xpt") # Write xpt v5 transport file
xportr_df_label(metacore) # Assigns dataset label from metacore specifications
# xportr_write("adppk.xpt") # Write xpt v5 transport file
```

0 comments on commit 707b466

Please sign in to comment.