export_marginal_distributions: Export Marginal Distributions

View source: R/export_marginal_distributions.R

export_marginal_distributionsR Documentation

Export Marginal Distributions

Description

Export the marginal distributions to CSV files

Usage

export_marginal_distributions(
  marginals,
  folder_path,
  create_folder = FALSE,
  force = FALSE
)

Arguments

marginals

an Object of type RESIDE from get_marginal_distributions

folder_path

path to folder where to save files.

create_folder

if the folder does not exist should it be created, Default: FALSE

force

if the folder already contains marginal distribution files should they be removed, Default: FALSE

Details

Exports each of the marginal distributions to CSV files within a given folder, along with the continuous quantiles.

Value

No return value, called for exportation of files.

See Also

get_marginal_distributions

Examples

marginal_distributions <- get_marginal_distributions(
  IST,
  variables = c("SEX", "AGE", "RSBP", "RATRIAL")
)
export_marginal_distributions(
  marginal_distributions,
  folder_path = file.path(tempdir(), "marginals"),
  create_folder = TRUE,
  force = TRUE
)

RESIDE documentation built on Oct. 1, 2026, 1:07 a.m.