dupmodel: Duplicate a selected model.

Description Usage Arguments Author(s) Examples

View source: R/dupmodel.R

Description

Create a copy of essential files from a selected model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dupmodel(path,
        path.new,
        modsp.file="model.spec.csv",
        model.file, 
        cols.file, 
        data,
        bat.file,
        model.file.new="test.mdl", 
        cols.file.new="cols1.txt", 
        data.new="data1.txt")

Arguments

path

System path for location of the model to be duplicated

path.new

System path for location of destination folder.

modsp.file

An output file from phxnlme that specifies the model file, column file, data file, and Phoenix NLME estimation method used in model run. If this file exists, the following arguments model.file,cols.file,data, and bat.file will be ignored.

model.file

Optional. A character string that provides the model file name (*.mdl). This argument will be ignored if modsp.file exists.

cols.file

Optional. A character string that provides the name of the columns mapping file. This is an ASCII text file that contains a series of statements that define the association between model concepts and columns in a data set (Refer to Phoenix NLME manual).This argument will be ignored if modsp.file exists.

data

Optional. A character string that provides the file name of the data file ( *.dat, *.csv or *.txt). This argument will be ignored if modsp.file exists.

bat.file

Optional. A character string that provides the file name of the batch file. This argument will be ignored if modsp.file exists.

model.file.new

A character string that provides the model file name (*.mdl) in the destination folder. Default is "test.mdl".

cols.file.new

A character string that provides the name of the columns mapping file in the destination folder. Default is "cols1.txt".

data.new

A character string that provides the file name of the data file in the destination folder. Default is "data1.txt".

Author(s)

Shuang Liang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if(!is.null(checkphxnlme(testchk=TRUE))){

## When modsp.file exists, specify path and destination path
path="C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME Command Line/Model 3"
path.new="C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME 
Command Line/Model 3/vpc_1"

## Duplicate model
dupmodel(path, path.new)

## When modsp.file does not exist, specify path, path.new, model.file, 
## cols.file, data, and bat.file
path="C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME Command Line/Model 3"
path.new="C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME
/Command Line/Model 3/vpc_1"
model.file="fm1theo.mdl"
cols.file="colstheo.txt" 
data="ThBates.csv" 
bat.file="RunNLME.bat"

## Duplicate model
dupmodel(path=path,path.new=path.new,model.file=model.file,cols.file=col.file
,data=data, bat.file=bat.file)
}

Phxnlme documentation built on May 1, 2019, 7:31 p.m.