|
PLT
Tools: A Graphical Interface for the NONMEM System |
In certain situations, a user may wish to create his/her own scripts to create additional graphics or perform statistical analyses. This can be accomplished in the following manner:
1. Create a folder USERSCRIPTS (all capital letters!) in the Project Folder.
2. Within that folder, create a text file 'UserDefinedScript.R'. That file should contain a set of commands for S-Plus or R (depending on the engine selected in Preferences). The commands must be syntactically correct. It is possible that the file UserDefinedScript.R contains only the command 'source("SomeOtherFile")'. For initial testing purposes, the user can create a file containing the command 'cat("\n\nHello World\n\n")'.
After PLT Tools has completed its normal execution, it will 'source' that file (i.e., read and execute the contents of the file). If the file is not syntactically correct, error messages will appear in the Output window.
The user can access
most 'objects' created within R/S-Plus. Of greatest utility to the user are:
1. ALL (dataframe): This is the contents of the AllRecords file.
2. ETAS (dataframe): If the FirstRecords file exists, this is the contents of
that file. If FirstRecords does not exist, this is a subset of ALL (the first
record for each ID).
3. DEMO (dataframe): If a covariates file exists, this is the contents of that
file. If not, it is an object created by PLT Tools
while processing ALL and ETAS.
4. FILEID
(character string): This is the 13-character timestring.
Many other objects are available. To identify which objects exist, the file UserDefinedScript.R can contain the command 'ls()'; a list of all objects will appear in the output window. The user can access these objects by further editing of the file UserDefinedScript.R. For example, to access the object 'PaperWidth', add the command 'cat("PaperWidth is", PaperWidth, "\n")' to UserDefinedScript.R.
If the user wishes to take advantage of certain formatting options used by PLT Tools to create graphics (e.g., to replicate the headers and footers that appear in graphics), contact support@PLTsoft.com.