specfile.character | R Documentation |
Identifies the data specification file associated with the datafile used by a model. Locates the datafile specified in the control stream, and substitutes a different extension.
## S3 method for class 'character'
specfile(x, find = "\\.csv$", use = ".spec", ...)
x |
the model name |
find |
file extension to replace |
use |
file extension to use |
... |
pass ext over-ride default file extension in datafile() |
character
datafile
Other path:
datafile()
,
datafile.character()
,
datafile.numeric()
,
modeldir()
,
modelfile()
,
modelpath()
,
modelpath.character()
,
modelpath.numeric()
,
psn_options()
,
specfile()
,
specfile.numeric()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.