Skip to contents

document_data creates an .R file containing detailed documentation of a provided dataset. It automatically generates a template including variables' names, data types, row and column counts, and placeholders for further description.

Arguments

x

A dataset loaded in the R environment. The function extracts its name, type, class, dimensions, and column names for documentation.

Value

This function generates an R script named after the dataset, which includes a structured documentation template. The template consists of the dataset's basic information and placeholders for detailed descriptions.

Examples

if (FALSE) {
  the_data <- as.data.frame(datasets::Titanic)
  document_data(the_data)
}