DRDataRaft/ docs
GitHub ↗

dr_init_project()

Creates a small project with synthetic CSV data, one product definition and a runner. Optional files integrate with targets, renv or Posit Connect. No packages are installed, services contacted or workflows executed. Existing non-empty directories are never overwritten.

Usage

dr_init_project(
  path,
  name = "orders",
  renv = FALSE,
  targets = FALSE,
  connect = FALSE
)

Arguments

path
New or empty project directory.


name
Product identity.


renv
Write init-renv.R for an optional isolated R environment.


targets
Write _targets.R for dependency-aware execution.


connect
Write job.qmd and deployment instructions for Posit Connect.

Value

The normalized project path, invisibly.

Details

Run source("run.R") in the new project to create output.rds and durable run evidence. Set DATARAFT_EVIDENCE to an appropriate persistent directory in deployments. The renv option writes a bootstrap script; a lockfile is created only when you explicitly run that script.

Examples

path <- tempfile("orders-project-")
dr_init_project(path)
list.files(path)
unlink(path, recursive = TRUE)

See also

dataraft.core::dr_product(), dr_as_targets()
Documentation source snapshot · View source at 2f9432d ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.