Skip to contents

Initializes a geopressure template project by creating a specified directory structure and populating it with essential files, including a DESCRIPTION file, README, license, and data.

This function sets up the project directory and ensures that all necessary components are in place for a geopressure analysis project.

Usage

write_geopressuretemplate(
  pkg,
  destdir = ".",
  project_name = pkg$name,
  overwrite = FALSE
)

Arguments

pkg

A list containing package metadata, including name, title, description, version, licenses, and contributors.

destdir

A character string specifying the destination directory where the project will be created. Default is the current directory (".").

project_name

A character string that sets the name of the project. Default is derived from pkg$name.

overwrite

A logical value indicating whether to overwrite an existing directory with the same name. Default is FALSE.

Value

The path to the created project directory.

Details

Upon execution, the function performs the following steps:

  • Creates the project directory.

  • Generates the DESCRIPTION file using metadata from pkg.

  • Creates a README file that outlines project details.

  • Generates a LICENSE file based on the specified licenses.

  • Writes relevant data files into the project structure.