Skip to content

Commit

Permalink
remove getmass related example
Browse files Browse the repository at this point in the history
  • Loading branch information
yufree committed Jan 13, 2025
1 parent 63c463f commit e47ca79
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
8 changes: 3 additions & 5 deletions R/mda.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ plotkms <- function(data, cutoff = 1000) {
#' Get the exact mass of the isotopologues from a chemical formula or reaction's isotope patterns with the highest abundances
#' @param data a chemical formula or reaction e.g. 'Cl-H', 'C2H4'
#' @return numerical vector
#' @examples
#' getmass('CH2')
#' @export
getmass <- function(data) {
if (grepl('-', data)) {
Expand Down Expand Up @@ -79,7 +77,7 @@ getmass <- function(data) {
#' @param mz numeric vector for exact mass
#' @return Relative Mass Defect
#' @examples
#' getrmd(getmass('C2H4'))
#' getrmd(28.0313)
#' @export
getrmd <- function(mz) {
rmd <- round((round(mz) - mz) / mz * 10 ^ 6)
Expand All @@ -89,7 +87,7 @@ getrmd <- function(mz) {
#' @param mz numeric vector for exact mass
#' @return raw Mass Defect
#' @examples
#' getmdr(getmass('C2H4'))
#' getmdr(28.0313)
#' @export
getmdr <- function(mz) {
md <- round((round(mz) - mz) * 10 ^ 3)
Expand All @@ -101,7 +99,7 @@ getmdr <- function(mz) {
#' @param method you could use `round`, `floor` or `ceiling`
#' @return high order Mass Defect with details
#' @examples
#' getmdh(getmass('C2H4'))
#' getmdh(28.0313)
#' @export
getmdh <- function(mz,
cus = c('CH2,H2'),
Expand Down
3 changes: 0 additions & 3 deletions man/getmass.Rd

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

2 changes: 1 addition & 1 deletion man/getmdh.Rd

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

2 changes: 1 addition & 1 deletion man/getmdr.Rd

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

2 changes: 1 addition & 1 deletion man/getrmd.Rd

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

0 comments on commit e47ca79

Please sign in to comment.