sample_info {pammtools} | R Documentation |
Extract information of the sample contained in a data set
Description
Given a data set and grouping variables, this function returns mean values
for numeric variables and modus for characters and factors. Usually
this function should not be called directly but will rather be called
as part of a call to make_newdata
.
Usage
sample_info(x)
## S3 method for class 'data.frame'
sample_info(x)
## S3 method for class 'ped'
sample_info(x)
## S3 method for class 'fped'
sample_info(x)
Arguments
x |
A data frame (or object that inherits from |
Value
A data frame containing sample information (for each group).
If applied to an object of class ped
, the sample means of the
original data is returned.
Note: When applied to a ped
object, that doesn't contain covariates
(only interval information), returns data frame with 0 columns.
[Package pammtools version 0.7.3 Index]