asWide: Convert an object to "wide" or "long" form.
Description
Convert an object to "wide" or "long" form.
Usage
asWide(x, ...)
## S3 method for class 'ten':
asWide(x, ...)
asLong(x, ...)
## S3 method for class 'ten':
asLong(x, ...)
Arguments
x
An object of class ten or pred.
...
Additional arguments (not implemented).
Value
A new data.table is returned,
with the data in 'wide' or 'long' format.
There is one row for each time point.
For a ten object generated from a numeric or Surv object,
this has columns:
ttime.
enumber of events.
nnumber at risk.
If derived from a survfit, coxph or formula object,
there are additional columns for e and n
for each covariate group.