merge samples

summarise_variables(
  object,
  what = c("sum_intensity", "mean_intensity", "median_intensity"),
  variable_id,
  variable_index,
  remain_variable_info_id,
  remain_variable_info_index,
  group_by,
  ...
)

summarize_variables(
  object,
  what = c("sum_intensity", "mean_intensity", "median_intensity"),
  variable_id,
  variable_index,
  remain_variable_info_id,
  remain_variable_info_index,
  group_by,
  ...
)

# S3 method for microbiome_dataset
summarise_variables(
  object,
  what = c("sum_intensity", "mean_intensity", "median_intensity"),
  variable_id,
  variable_index,
  remain_variable_info_id,
  remain_variable_info_index,
  group_by,
  ...
)

Arguments

object

microbiome_dataset

what

which you want to use

variable_id

variables should be merged

variable_index

variables should be merged

remain_variable_info_id

which variable information should be used.

remain_variable_info_index

which variable information should be used.

group_by

group all variables by column in variable_info

...

other params

Value

microbiome_dataset

Examples

data(global_patterns)
dim(global_patterns)
#> variables   samples 
#>     19216        26 
global_patterns
#> -------------------- 
#> microbiomedataset version: 0.99.1 
#> -------------------- 
#> 1.expression_data:[ 19216 x 26 data.frame]
#> 2.sample_info:[ 26 x 8 data.frame]
#> 3.variable_info:[ 19216 x 8 data.frame]
#> 4.sample_info_note:[ 8 x 2 data.frame]
#> 5.variable_info_note:[ 8 x 2 data.frame]
#> -------------------- 
#> Processing information (extract_process_info())
#> create_microbiome_dataset ---------- 
#>             Package               Function.used                Time
#> 1 microbiomedataset create_microbiome_dataset() 2022-07-10 10:56:13

global_patterns <-
  global_patterns %>%
  activate_microbiome_dataset(what = "variable_info") %>%
  dplyr::filter(!is.na(Genus))

object <-
  global_patterns %>%
  summarize_variables(what = "sum_intensity", group_by = "Genus")

dim(object)
#> variables   samples 
#>       983        26