ys_project: Create a project object from data spec objects

View source: R/class-yproject.R

ys_projectR Documentation

Create a project object from data spec objects

Description

Create a project object from data spec objects

Usage

ys_project(
  ...,
  output = tempfile(fileext = ".yml"),
  data_path = NULL,
  dots = list(),
  sponsor = "[sponsor]",
  projectnumber = "[projectnumber]",
  keep_spec_data = FALSE
)

ys_project_file(
  ...,
  output = tempfile(fileext = ".yml"),
  where = NULL,
  dots = list()
)

as_proj_spec(...)

Arguments

...

yspec objects or file names of yaml specification files

output

the name and path where the project file is to be written

data_path

optional data path

dots

used to update SETUP__ block data items

sponsor

optional project sponsor

projectnumber

optional project number in ...

keep_spec_data

if TRUE, then the specification data is saved in the meta space of the project object

where

directory containing the specification files if listed

Details

Note that sponsor and projectnumber can be updated upon creating the project object. Other document-specific attributes (like title, author, date) can be specified through ys_document.

Value

an object of class yproj

Examples

where <- system.file("spec", package = "yspec")

files <- file.path(where, c("DEM104101F_PK.yml", "DEM104101F_AE.yml"))

proj <- ys_project(ys_load(files[1]),ys_load(files[2]), sponsor="CompanyX")

proj <- ys_project_file(files[1], files[2], dots = list(projectnumber = "ZZZzzz"))

proj


metrumresearchgroup/yspec documentation built on Dec. 22, 2024, 1:37 a.m.