Skip to content

Commit

Permalink
Added exports, so hopefully the library will actually do something now.
Browse files Browse the repository at this point in the history
  • Loading branch information
LS31 committed Sep 19, 2017
1 parent 768706e commit 21e4da9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Imports: magrittr
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(calculate_bmi)
export(calculate_bsa)
export(calculate_qtc_bazett)
export(calculate_qtc_fridericia)
export(has_metabolic_syndrome)
importFrom(magrittr,"%>%")
1 change: 1 addition & 0 deletions R/bmi.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#' @param weight Weight in kg.
#' @param length Length in cm.
#' @return BMI in kg/m^2.
#' @export
calculate_bmi <- function(weight, length) {
length <- length / 100
weight / (length ^ 2)
Expand Down
1 change: 1 addition & 0 deletions R/bsa.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @param weight Weight in kg.
#' @param length Length in cm.
#' @return BSA in m^2.
#' @export
calculate_bsa <- function(weight, length) {
(weight * length / 3600) ^ (1 / 2)
}
2 changes: 1 addition & 1 deletion R/metabolic_syndrome.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#' @param has_lipid_drug TRUE if patient is on fibrate, nicotinic acid or statin.
#' @param has_glucose_drug TRUE if patient is on drug treatment for elevated
#' glucose.
#'
#' @return TRUE if patient has the metabolic syndrome, FALSE is not, NA if
#' indetermined.
#' @export
has_metabolic_syndrome <- function(is_female,
waist_circumference = NA,
systolic_blood_pressure = NA,
Expand Down
2 changes: 2 additions & 0 deletions R/qtc.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#' @param heart_rate Heart rate in beats/min.
#' @return QTc in ms
#' @rdname calculate_qtc
#' @export
calculate_qtc_bazett <- function(qt, heart_rate) {
qt <- qt / 1000
rr <- 60 / heart_rate
qt / (rr ^ (1 / 2)) * 1000
}

#' @rdname calculate_qtc
#' @export
calculate_qtc_fridericia <- function(qt, heart_rate) {
qt <- qt / 1000
rr <- 60 / heart_rate
Expand Down
16 changes: 16 additions & 0 deletions man/reexports.Rd

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

0 comments on commit 21e4da9

Please sign in to comment.