The Setup tab allows mapping of datasets and scripts to the object. The Mappings panel(s) of the Setup tab for the dataset displays the column headers specified in the script file. When R Shell is selected in the Setup tab, the Text panel allows mapping of the file to the object and viewing of the script itself.
Map the data by dragging the dataset from the Data folder to the Setup tab or use the icon in the Setup tab. Once a dataset is mapped, use the option buttons in the Mappings panels to assign the columns in the dataset to the appropriate context associations. Required mappings are colored orange.
Note: Any apostrophe marks in the input data (e.g., 5’-deoxy-) should be removed or substituted, as they can prevent Phoenix from reading the data. Apostrophes are interpreted as quotation marks, so data between two apostrophes is considered to be a single cell value. This can result in the number of columns not being the same for all rows,
How dataset Mappings panels are defined in R scripts
Before the script is mapped, there are no data inputs into the R Shell object. The data inputs are defined in the attach() statement in the script. When using an imported dataset or a results worksheet as input for an R script, one or more attach() statements must be in the script to map an input dataset or sets. Format the attach() statement in the script as:
attach(dataname) #WNL_IN context1 context2 context3 etc#
Each attach() statement creates a data mappings panel that allows mapping a dataset as input for the script, and mapping study data to the contexts defined in the attach() statement. If the study variable names are the same as the context names, the study variables are automatically mapped to the appropriate contexts. For example,
attach(Eta) #WNL_IN Id nV nCl#
A data input called Eta is created in the object and is listed in the Setup and Diagram tabs. Also, the data mapping contexts Id, nV, and nCl are created in the Eta Mappings panel.
Using the #WNL_IN # comment to create mapping contexts is optional. If it is used, the column names in the comment must be space-delimited. If it is not used, then there are no mapping options available in the Mappings panel and Phoenix treats the data as an external source specified in the script and not as an imported dataset. Scripts written in this manner would be difficult to share as the sources might not be available on a different computer.
The example R script (plotpredtable.r), available in …\Examples\R, has these lines:
attach(Residuals) #WNL_IN ID IVAR TAD POPPRED INDPRED
OBS IRES WTIRES WRES CWRES PCWRES CdfPCWRES CdfDV#
attach(Eta) #WNL_IN Id nV nCl#
When using the R object for accessing the Model Comparer results for NLME or NONMEM, the default csv file generated for importing into R will not work. The columns beginning with “#” prevent the file from loading into R. To avoid this problem, set up Model Comparer so it will not generate these particular output columns, or explicitly state the columns to import by using the commenting mechanism for mapping in the R tool. For example, use a script similar to the following to list the columns to import and then map the columns:
attach(compare.df) #WNL_IN Hide Compare Name Sort
Method Description Lineage LogLik -2(LL) AIC
BIC -2(LL)Delta AICDelta BICDelta NumParms
NumObs NumSubj pvalue
Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.