Skip to content

Commit

Permalink
Fixed as_function bug; fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Drucker committed Jan 20, 2025
1 parent 1b6e1fe commit 527efa1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ Misc/

**/*.html
vignettes/*.R

tests/
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ Remotes:
github::cran/FField,
github::PNNL-Comp-Mass-Spec/MSnID@pnnl-master
VignetteBuilder: knitr
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ importFrom(reshape2,acast)
importFrom(reshape2,melt)
importFrom(rlang,"!!")
importFrom(rlang,":=")
importFrom(rlang,as_function)
importFrom(rlang,parse_expr)
importFrom(rlang,sym)
importFrom(scales,alpha)
Expand Down
8 changes: 4 additions & 4 deletions R/rollup.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ rrollup <- function(msnset, rollBy, rollFun,
algorithm <- match.arg(algorithm)

if(algorithm == "reference"){
summarisedFeatures <- list()
summarizedFeatures <- list()
unique_rollBy <- unique(fData(msnset)[[rollBy]])
for (i in 1:length(unique_rollBy)) {
for (i in seq_along(unique_rollBy)) {
# Subset msnset to each rollBy group
msnset_sub <- msnset[fData(msnset)[[rollBy]] == unique_rollBy[i], ,
drop = FALSE]
summarisedFeatures[[i]] <- rrollup_a_feature_set(msnset_sub, rollBy,
summarizedFeatures[[i]] <- rrollup_a_feature_set(msnset_sub, rollBy,
rollFun, verbose)
}
exprs.new <- do.call(rbind, summarisedFeatures)
exprs.new <- do.call(rbind, summarizedFeatures)
rownames(exprs.new) <- unique_rollBy
} else {
temp <- data.frame(rollBy = fData(msnset)[[rollBy]],
Expand Down

0 comments on commit 527efa1

Please sign in to comment.