Entering edit mode
VanessaOak
•
0
@vanessaoak-24302
Last seen 4.0 years ago
I have an expressionset with timepoints on one axis and different samples on the other axis.
I need to average the data for different samples which are currently defined as different "rowNames", the metadata for those samples is defined by varLabels: Cell.Type Cell.Number Compound.Name. I would like to average all the samples with the same Compound name at each time point, this would essentially create a new expression set with fewer samples.
What would be the best way to approach this?
Here is my expression set info:
ExpressionSet (storageMode: lockedEnvironment)
assayData: 2384 features, 39 samples
element names: exprs
protocolData: none
phenoData
rowNames: A1 A2 ... NA.3 (39 total)
varLabels: Cell.Type Cell.Number Compound.Name
varMetadata: X.labelDescription...c..Cell.Type....Cell.Number....Compound.Name... labelDescription
featureData
featureNames: 0 0.006944444 ... 72.5775 (2384 total)
fvarLabels: timepoints
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:
sessionInfo( )
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] readxl_1.3.1 forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2 purrr_0.3.4
[6] readr_1.4.0 tidyr_1.1.2 tibble_3.0.4 ggplot2_3.3.2 tidyverse_1.3.0
[11] RTCA_1.42.0 gtools_3.8.2 RColorBrewer_1.1-2 Biobase_2.50.0 BiocGenerics_0.36.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 cellranger_1.1.0 pillar_1.4.7 compiler_4.0.2 dbplyr_2.0.0 tools_4.0.2
[7] lubridate_1.7.9.2 jsonlite_1.7.1 lifecycle_0.2.0 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.9
[13] reprex_0.3.0 cli_2.2.0 DBI_1.1.0 rstudioapi_0.13 haven_2.3.1 withr_2.3.0
[19] xml2_1.3.2 httr_1.4.2 fs_1.5.0 generics_0.1.0 vctrs_0.3.5 hms_0.5.3
[25] grid_4.0.2 tidyselect_1.1.0 glue_1.4.2 R6_2.5.0 fansi_0.4.1 modelr_0.1.8
[31] magrittr_2.0.1 backports_1.2.0 scales_1.1.1 ellipsis_0.3.1 rvest_0.3.6 assertthat_0.2.1
[37] colorspace_2.0-0 utf8_1.1.4 stringi_1.5.3 munsell_0.5.0 broom_0.7.2 crayon_1.3.4