datafile.character: Identify the Datafile for a Model

View source: R/path.R

datafile.characterR Documentation

Identify the Datafile for a Model

Description

Identifies the datafile used by a model. Expresses it relative to current working directory.

Usage

## S3 method for class 'character'
datafile(x, ...)

Arguments

x

the model name or path to a control stream

...

ext can be passed to modelfile, etc.

Value

character

See Also

Other path: datafile.numeric(), datafile(), modeldir(), modelfile(), modelpath.character(), modelpath.numeric(), modelpath(), psn_options(), specfile.character(), specfile.numeric(), specfile()

Examples

library(spec)
source <- system.file(package = 'nonmemica','project')
target <- tempdir()
target <- gsub('\\\\','/',target) # for windows
file.copy(source,target,recursive = TRUE)
project <- file.path(target,'project','model')
options(project = project)
library(magrittr)
1001 %>% datafile
datafile(1001) %matches% specfile(1001)
1001 %>% specfile
1001 %>% specfile %>% read.spec

bergsmat/nonmemica documentation built on Sept. 15, 2023, 9:22 a.m.