Generate a dataset with different types of columns and layers
Usage
generate_dataset(
n_obs = 10L,
n_vars = 20L,
x_type = "numeric_matrix",
layer_types = c("numeric_matrix", "numeric_dense", "numeric_csparse",
"numeric_rsparse", "numeric_matrix_with_nas", "numeric_dense_with_nas",
"numeric_csparse_with_nas", "numeric_rsparse_with_nas", "integer_matrix",
"integer_dense", "integer_csparse", "integer_rsparse", "integer_matrix_with_nas",
"integer_dense_with_nas", "integer_csparse_with_nas", "integer_rsparse_with_nas"),
obs_types = c("character", "integer", "factor", "factor_ordered", "logical", "numeric",
"character_with_nas", "integer_with_nas", "factor_with_nas",
"factor_ordered_with_nas", "logical_with_nas", "numeric_with_nas"),
var_types = c("character", "integer", "factor", "factor_ordered", "logical", "numeric",
"character_with_nas", "integer_with_nas", "factor_with_nas",
"factor_ordered_with_nas", "logical_with_nas", "numeric_with_nas"),
obsm_types = c("numeric_matrix", "numeric_dense", "numeric_csparse", "numeric_rsparse",
"numeric_matrix_with_nas", "numeric_dense_with_nas", "numeric_csparse_with_nas",
"numeric_rsparse_with_nas", "integer_matrix", "integer_dense", "integer_csparse",
"integer_rsparse", "integer_matrix_with_nas", "integer_dense_with_nas",
"integer_csparse_with_nas", "integer_rsparse_with_nas", "character", "integer",
"factor", "factor_ordered", "logical", "numeric", "character_with_nas",
"integer_with_nas", "factor_with_nas",
"factor_ordered_with_nas",
"logical_with_nas", "numeric_with_nas"),
varm_types = c("numeric_matrix", "numeric_dense", "numeric_csparse", "numeric_rsparse",
"numeric_matrix_with_nas", "numeric_dense_with_nas", "numeric_csparse_with_nas",
"numeric_rsparse_with_nas", "integer_matrix", "integer_dense", "integer_csparse",
"integer_rsparse", "integer_matrix_with_nas", "integer_dense_with_nas",
"integer_csparse_with_nas", "integer_rsparse_with_nas", "character", "integer",
"factor", "factor_ordered", "logical", "numeric", "character_with_nas",
"integer_with_nas", "factor_with_nas",
"factor_ordered_with_nas",
"logical_with_nas", "numeric_with_nas"),
obsp_types = c("numeric_matrix", "numeric_dense", "numeric_csparse", "numeric_rsparse",
"numeric_matrix_with_nas", "numeric_dense_with_nas", "numeric_csparse_with_nas",
"numeric_rsparse_with_nas", "integer_matrix", "integer_dense", "integer_csparse",
"integer_rsparse", "integer_matrix_with_nas", "integer_dense_with_nas",
"integer_csparse_with_nas", "integer_rsparse_with_nas"),
varp_types = c("numeric_matrix", "numeric_dense", "numeric_csparse", "numeric_rsparse",
"numeric_matrix_with_nas", "numeric_dense_with_nas", "numeric_csparse_with_nas",
"numeric_rsparse_with_nas", "integer_matrix", "integer_dense", "integer_csparse",
"integer_rsparse", "integer_matrix_with_nas", "integer_dense_with_nas",
"integer_csparse_with_nas", "integer_rsparse_with_nas"),
uns_types = c("scalar_character", "scalar_integer", "scalar_factor",
"scalar_factor_ordered", "scalar_logical", "scalar_numeric",
"scalar_character_with_nas", "scalar_integer_with_nas", "scalar_factor_with_nas",
"scalar_factor_ordered_with_nas", "scalar_logical_with_nas",
"scalar_numeric_with_nas", "vec_character", "vec_integer", "vec_factor",
"vec_factor_ordered", "vec_logical", "vec_numeric", "vec_character_with_nas",
"vec_integer_with_nas", "vec_factor_with_nas", "vec_factor_ordered_with_nas",
"vec_logical_with_nas",
"vec_numeric_with_nas", "df_character", "df_integer",
"df_factor", "df_factor_ordered", "df_logical", "df_numeric",
"df_character_with_nas", "df_integer_with_nas", "df_factor_with_nas",
"df_factor_ordered_with_nas", "df_logical_with_nas", "df_numeric_with_nas",
"mat_numeric_matrix", "mat_numeric_dense", "mat_numeric_csparse",
"mat_numeric_rsparse", "mat_numeric_matrix_with_nas", "mat_numeric_dense_with_nas",
"mat_numeric_csparse_with_nas", "mat_numeric_rsparse_with_nas", "mat_integer_matrix",
"mat_integer_dense", "mat_integer_csparse", "mat_integer_rsparse",
"mat_integer_matrix_with_nas", "mat_integer_dense_with_nas",
"mat_integer_csparse_with_nas", "mat_integer_rsparse_with_nas", "list"),
example = FALSE,
format = c("list", "AnnData", "SingleCellExperiment", "Seurat")
)
Arguments
- n_obs
Number of observations to generate
- n_vars
Number of variables to generate
- x_type
Type of matrix to generate for X
- layer_types
Types of matrices to generate for layers
- obs_types
Types of vectors to generate for obs
- var_types
Types of vectors to generate for var
- obsm_types
Types of matrices to generate for obsm
- varm_types
Types of matrices to generate for varm
- obsp_types
Types of matrices to generate for obsp
- varp_types
Types of matrices to generate for varp
- uns_types
Types of objects to generate for uns
- example
If
TRUE
, the types will be overridden to a small set of types. This is useful for documentations.- format
Object type to output, one of "list", "AnnData", "SingleCellExperiment", or "Seurat".