epi_write_df: Save a Data Frame to a File with Custom Formatting

View source: R/epi_write_df.R

epi_write_dfR Documentation

Save a Data Frame to a File with Custom Formatting

Description

This function constructs a file path using a specified subdirectory, file name, and suffix, then writes a data frame to that file. It is designed for flexibility in saving results with standardized naming conventions.

Usage

epi_write_df(df, results_subdir, file_n, suffix)

Arguments

df

A data frame to be written to the file.

results_subdir

A character string specifying the directory where the file will be saved.

file_n

A character string specifying the base name of the file (without the suffix).

suffix

A character string specifying the file extension (e.g., "txt", "csv").

Value

The full file path of the saved file. Prints a message indicating the file's location.

Examples

## Not run: 
# Example usage
results_subdir <- "output"
file_n <- "desc_dates"
suffix <- "txt"
epi_write_df(sum_dates_df, results_subdir, file_n, suffix)

## End(Not run)


AntonioJBT/episcout documentation built on Feb. 20, 2025, 12:46 a.m.