gConvert(df, in.pre = NULL, in.var = NULL, out.type = c("inc", "rad"),
out.pre = out.type)
"inc} (the default) the output data frame will be incremental measurements. If code{"rad
the output data frame will be radial measurements.out.type
.in.pre
or in.var
, from the df
retained as the left-most columns and the original data in the in.var
columns converted to the out.type
type as the remaining columns.out.type
(i.e., that a conversion is needed). It does not check to see if this is true.
The columns that contain the original measurement data can specified in a variety of ways. First, if all columns begin with the same prefix (and no other columns contain that prefix), then the prefix string may be given to in.pre=
. Second, a sequence of column numbers may be given to in.var=
with the #:#} (if the columns are contiguous) or as a vector (if the columns are not contiguous). Third, a vector of column names may be given to \code{in.var=}. Note that one, but not both, of \code{in.var=} or \code{in.pre=} must be specified by the user.
The newly computed data will be labeled with a prefix the same as out.type=
(i.e., "rad"
or "inc"
) unless out.pre=
is set by the user. For example, if the data are converted to radial measurements, then the output variables will be rad1 , rad2 , etc. unless out.pre=
was changed from the default. This function assumes that the measurements start with age-1.
addRadCap
for related functionality.