Extracts or assigns the data from the Data or SData slots in an "xpose.data" object.
1 2 3 4 5 6 7 8
An "xpose.data" object
Logical value indicating whether rows with WRES==0 should be included in the extracted data.
Logical value indicating whether only the first line per individual should be included in the extracted data.
Expression with which the extracted data should be subset (see
An R data.frame.
An integer between 1 and [email protected]
When using Data to assign a data.frame to the Data slot in the "xpose.data" object a number of things happen:
Each column in the data.frame is checked and set to factor if the number of
unique values are less than the value of Cat.levels (see
It is checked which of the predefined xpose data variables that exists in the data.frame. The variable definitions that does not exist are set to NULL.
The column identified by the
dv xpose variable definition, is checked
and set to factor if the number of unique values are less than or equal to
the DV.Cat.levels (see
Finally, each column name in the data.frame is checked for a label (see
xpose.prefs-class). If it is non-existent, the label is set to
the column name.
When SData is used to assign a data.frame to the SData slot it is first
checked that the number of rows in the SData data.frame is an even multiple
of the number of rown in Data. Next, each column in the SData data.frame is
assigned the same class as the corresponding column in the Data data.frame
(it is required that the columns are the same in Data and SData). Finally,
an extra column, "iter", is added to SData, which indicates the iteration
number that each row belongs to. At the same time, the Nsim slot of the
"xpose.data" object is set to the number of iterations (see
Returns a data.frame from the Data or SData slots, excluding rows as indicated by the arguments.
Data: Extract data
Data<-: assign data
SData: extract simulated data
SData<-: assign simulated data
Other data functions:
1 2 3 4 5 6 7 8 9 10 11 12 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.