Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #81 Review the deepdive vignette #191

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# xportr 0.3.1.9002
# xportr (development version)

## New Features and Bug Fixes

* `xportr_write()` now accepts `metadata` argument which can be used to set the dataset label to stay consistent with the other `xportr_*` functions. It is noteworthy that the dataset label set using the `xportr_df_label()` function will be retained during the `xportr_write()`.
* Exporting a new dataset `dataset_spec` that contains the Dataset Specification for ADSL.
* Exporting a new dataset `dataset_spec` that contains the Dataset Specification for ADSL. (#179)

## Deprecation and Breaking Changes
* The `label` argument from the `xportr_write()` function is deprecated in favor of the `metadata` argument.

* The `label` argument from the `xportr_write()` function is deprecated in favor of the `metadata` argument. (#179)

## Documentation

* Created development version of the website (#187)
* Additional guidance for options added in deep dive vignette (#81)

# xportr 0.3.1

## New Features and Bug Fixes
Expand Down
15 changes: 7 additions & 8 deletions vignettes/deepdive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,19 @@ options(
One final note on `options()`. 4 of the core `{xportr}` functions have the ability to set messaging as `"none", "message", "warn", "stop"`. Setting each of these in all your calls can be a bit repetitive. You can use `options()` to set these at a higher level and avoid this repetition.

```{r, eval = FALSE}
# Default
# Default verbose is set to `none`
options(
xportr.format_verbose = "none",
xportr.label_verbose = "none",
xportr.length_verbose = "none",
xportr.type_verbose = "none",
xportr.type_verbose = "none"
)

# Will send Warning Message to Console
options(
xportr.format_verbose = "warn",
xportr.label_verbose = "warn",
xportr.length_verbose = "warn",
xportr.type_verbose = "warn",
xportr.format_verbose = "none", # Disables any messaging, keeping the console output clean
xportr.label_verbose = "message", # Sends a standard message to the console
xportr.length_verbose = "warn", # Sends a warning message to the console
xportr.type_verbose = "stop" # Stops execution and sends an error message to the console
)
```

Expand Down Expand Up @@ -286,7 +285,7 @@ glimpse(adsl_type_glimpse)
Note that `xportr_type(verbose = "warn")` was set so the function has provided feedback, which would show up in the console, on which variables were converted as a warning message. However, you can set `verbose = "stop"` so that the types are not applied if the data does not match what is in the specification file. Using `verbose = "stop"` will instantly stop the processing of this function and not create the object. A user will need to alter the variables in their R script before using `xportr_type()`

```{r, echo = TRUE, error = TRUE}
adsl_type <- xportr_type(.df = adsl, metadata = var_spec, domain = "ADSL", verbose = "stop")
adsl_type <- xportr_type(.df = adsl_fct, metadata = var_spec, domain = "ADSL", verbose = "stop")
```

## `xportr_length()`
Expand Down
Loading