Learn R Programming

Phxnlme (version 1.0.0)

dupmodel: Duplicate a selected model.

Description

Create a copy of essential files from a selected model.

Usage

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".

Examples

Run this code
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)
}

Run the code above in your browser using DataLab