Export general data.frame object as XPT file

A data.frame object can be exported to a SAS XPT file. If desired, the naming of columns in the general dataset can be considered. Alternatively, or additionally, labels can be provided with the addColLabels input argument.

IQRoutputXPT(
  data,
  filename = NULL,
  covInfoAdd = NULL,
  catInfoAdd = NULL,
  addColLabels = NULL
)

Arguments

data

data.frame to export as XPT

filename

Filename of the XPT file to create (not more than 8 characters without extension)

covInfoAdd

(Handling covariates that are stored in additional columns in the dataset) List with information about additional continuous covariates. The list needs to contain 4 named elements: COLNAME, NAME, UNIT, TIME.VARYING (in this order). Each value of these elements is a vector. COLNAME defines the column names of the additional covariates, NAME the "real" name, UNIT their UNIT, and TIME.VARYING is TRUE or FALSE depending ... Example: covInfoAdd <- list( COLNAME=c("WT0","AGE0"),NAME=c("Bodyweight at baseline","Age"), UNIT=c("kg","years"),TIME.VARYING=c(FALSE,FALSE))

catInfoAdd

(Handling covariates that are stored additional columns in the dataset) List with information about additional categorical covariates. The list needs to contain 6 named elements: COLNAME, NAME, UNIT, VALUETXT, VALUES, TIME.VARYING (in this order). Each value of these elements is a vector. COLNAME defines the column names of the additional covariates, NAME the "real" name, and UNIT their UNIT. VALUETXT is a string defining a vector in R notation, containing the text version of the different levels. VALUES is a string defining a numeric vector in notation, containing the numeric version of the different levels (used in the corresponding covariate column), and TIME.VARYING is TRUE or FALSE depending ... Example: catInfoAdd <- list( COLNAME=c("SEX","FOOD"),NAME=c("Gender","Food taken"), UNIT=c("-","-"),VALUETXT=c("Male,Female", "NO,YES"), VALUES=c("1,2","0,1"),TIME.VARYING=c(FALSE,FALSE))

addColLabels

List with named elements. Names are column names and the value of an element is the label. If defining addColLabels for columns that are already handled automatically, the provided labels will overwrite the automatic ones. Example: addColLabels <- list(IXGDF="Other label",NEWCCOL="Label for NEWCOL")

See also