Skip to content

Commit

Permalink
Update documentation and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
johanna0321 committed May 16, 2024
1 parent 6186c8a commit 5ef645e
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 89 deletions.
5 changes: 5 additions & 0 deletions R/mutate_mzroll_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,11 @@ fit_lm <- function (groupData,
# Compute corrected values
lm_apply <- lm_data %>%
dplyr::mutate(median_value = median(.data$val_var, na.rm = T)) %>%

# Assign new normalized variable norm_peak_varname:
# Predict values from linear fit are subtracted from quant_peak_varname,
# which centers the data around zero
# Median value from quant_peak_varname is added back to maintain abundance value
dplyr::mutate(`:=`(!!rlang::sym(norm_peak_varname),
.data$val_var - .env$predict(lm_model, newdata = lm_data) + .data$median_value)) %>%
dplyr::mutate(lm_estimate = summary(.env$lm_model)$coefficient[2,1]) %>%
Expand Down
9 changes: 1 addition & 8 deletions man/collapse_injections.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/collapse_metabolites.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/diffex_mzroll.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/filter_groupIds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/find_pathway_enrichments.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/floor_peaks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/merge_compounds_tbl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/merge_samples_tbl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/normalize_peaks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/plot_barplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions man/plot_compare_injection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/test_mzroll_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ef645e

Please sign in to comment.