diff --git a/R/mda.R b/R/mda.R index e509f83..6a46074 100644 --- a/R/mda.R +++ b/R/mda.R @@ -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)) { @@ -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) @@ -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) @@ -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'), diff --git a/man/getmass.Rd b/man/getmass.Rd index bae93b8..9e206d8 100644 --- a/man/getmass.Rd +++ b/man/getmass.Rd @@ -15,6 +15,3 @@ numerical vector \description{ Get the exact mass of the isotopologues from a chemical formula or reaction's isotope patterns with the highest abundances } -\examples{ -getmass('CH2') -} diff --git a/man/getmdh.Rd b/man/getmdh.Rd index 6985616..52278c3 100644 --- a/man/getmdh.Rd +++ b/man/getmdh.Rd @@ -20,5 +20,5 @@ high order Mass Defect with details Get the high order unit based Mass Defect } \examples{ -getmdh(getmass('C2H4')) +getmdh(28.0313) } diff --git a/man/getmdr.Rd b/man/getmdr.Rd index 493aa7f..7c706cf 100644 --- a/man/getmdr.Rd +++ b/man/getmdr.Rd @@ -16,5 +16,5 @@ raw Mass Defect Get the raw Mass Defect } \examples{ -getmdr(getmass('C2H4')) +getmdr(28.0313) } diff --git a/man/getrmd.Rd b/man/getrmd.Rd index f7672a5..f22bec7 100644 --- a/man/getrmd.Rd +++ b/man/getrmd.Rd @@ -16,5 +16,5 @@ Relative Mass Defect Get the Relative Mass Defect } \examples{ -getrmd(getmass('C2H4')) +getrmd(28.0313) }