Skip to content
Snippets Groups Projects
Unverified Commit 65264f41 authored by Todor Kondic's avatar Todor Kondic
Browse files

Add function to add mzML files to the data file table

* R/shiny-ui-base.R(add_mzML_files): New function.
parent c840d06a
No related branches found
No related tags found
No related merge requests found
...@@ -120,3 +120,21 @@ combine_tags <- function(df_tags,txt_tags) { ...@@ -120,3 +120,21 @@ combine_tags <- function(df_tags,txt_tags) {
df_tags df_tags
} }
add_mzML_files<-function(df,paths) {
lSet<-levels(df$set)
if (length(lSet>0) && !is.na(lSet)) {
nR<-length(paths)
if (nR>0) {
st<-nrow(df)+1
fi<-nrow(df)+nR
df[st:fi,'tag']<-levels(df$tag)[[1]]
df[st:fi,'set']<-levels(df$set)[[1]]
df[st:fi,'mode']<-levels(df$mode)[[1]]
df[st:fi,'Files']<-paths
}
df
} else {
warning("Define sets using the compound set table before trying to add files!")
df
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment