Skip to content

Commit

Permalink
added library tidyr for separate_rows
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristinaSchmidt1 committed Oct 31, 2024
1 parent a422368 commit b0d28df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/MetaDataAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ MetaAnalysis <- function(InputData,
## ---------- DF 2: Metabolites as row names ------------##
Res_Top <- Stat_results%>%
filter(tukeyHSD_p.adjusted< StatCutoff)%>%
separate_rows(paste("Features_", "(Top", Percentage, "%)", sep=""), sep = ", ")%>% # Separate 'Features (Top 0.1%)'
tidyr::separate_rows(paste("Features_", "(Top", Percentage, "%)", sep=""), sep = ", ")%>% # Separate 'Features (Top 0.1%)'
dplyr::rename("FeatureID":= paste("Features_", "(Top", Percentage, "%)", sep=""))%>%
select(- paste("Features_", "(Bottom", Percentage, "%)", sep=""))

Res_Bottom <- Stat_results%>%
filter(tukeyHSD_p.adjusted< StatCutoff)%>%
separate_rows(paste("Features_", "(Bottom", Percentage, "%)", sep=""), sep = ", ")%>% # Separate 'Features (Bottom 0.1%)'
tidyr::separate_rows(paste("Features_", "(Bottom", Percentage, "%)", sep=""), sep = ", ")%>% # Separate 'Features (Bottom 0.1%)'
dplyr::rename("FeatureID":= paste("Features_", "(Bottom", Percentage, "%)", sep=""))%>%
select(- paste("Features_", "(Top", Percentage, "%)", sep=""))

Expand Down
1 change: 1 addition & 0 deletions vignettes/Metadata Analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ library(MetaProViz)
library(magrittr)
library(dplyr)
library(rlang)
library(tidyr)
#Please install the Biocmanager Dependencies:
#BiocManager::install("clusterProfiler")
Expand Down

0 comments on commit b0d28df

Please sign in to comment.