Skip to content

Commit

Permalink
Merge pull request #12 from nutriverse/dev
Browse files Browse the repository at this point in the history
remove returns
  • Loading branch information
ernestguevarra authored Apr 9, 2024
2 parents 8dcfd6c + 6ab3442 commit ec1d305
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 32 deletions.
6 changes: 3 additions & 3 deletions R/01_summary_measure.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ calculate_mean <- function(measures, index = NULL) {
}

## return sm_mean
return(sm_mean)
sm_mean
}


Expand All @@ -84,7 +84,7 @@ calculate_sd <- function(measures, index = NULL) {
}

## return sm_sd
return(sm_sd)
sm_sd
}


Expand All @@ -101,5 +101,5 @@ calculate_max <- function(measures, index = NULL) {
}

## return sm_max_diff
return(sm_max_diff)
sm_max_diff
}
2 changes: 1 addition & 1 deletion R/02_calculate_tem.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ calculate_tem <- function(d, n) {
tem <- sqrt(sum(d ^ 2) / (2 * n))

## Return output
return(tem)
tem
}
2 changes: 1 addition & 1 deletion R/03_calculate_tem_cohort.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ calculate_tem_cohort <- function(df, m1, m2, index = NULL, n) {
names(tem) <- c(index, "tem")

#return output
return(tem)
tem
}
2 changes: 1 addition & 1 deletion R/04_calculate_team_tem.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ calculate_team_tem <- function(n, k, m) {
tem <- sqrt(sum(firstPart - secondPart) / (n * (k - 1)))

## Return output
return(tem)
tem
}
2 changes: 1 addition & 1 deletion R/05_calculate_relative_tem.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ calculate_relative_tem <- function(tem, mean_value) {
relative_tem <- tem / mean_value * 100

## Return output
return(relative_tem)
relative_tem
}
2 changes: 1 addition & 1 deletion R/06_calculate_total_tem.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ calculate_total_tem <- function(intra, inter) {
total_tem <- sqrt((sum(intra ^ 2) / length(intra)) + (inter ^ 2))

## Return output
return(total_tem)
total_tem
}
2 changes: 1 addition & 1 deletion R/07_calculate_coeff_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ calculate_coeff_r <- function(total_tem, sd) {

coeff_r <- (total_tem ^ 2) / sd

return(coeff_r)
coeff_r
}
2 changes: 1 addition & 1 deletion R/08_estimate_bias.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ estimate_bias <- function(msur, msup, mall) {
bias <- data.frame(bias_super, bias_med)

## Return output
return(bias)
bias
}
21 changes: 0 additions & 21 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
################################################################################
#
#'
#' Example dataset from *Ulijaszek and Kerr (1999)* containing repeat
#' measurements of stature `m` carried out by four observers on ten subjects.
Expand All @@ -24,13 +22,9 @@
#' assessment of nutritional status. Br J Nutr. 2007;82: 165–13.
#' doi:10.1017/S0007114599001348
#'
#
################################################################################
"stature"


################################################################################
#
#'
#' Standardisation test data - sample 1
#'
Expand Down Expand Up @@ -60,13 +54,9 @@
#' (SMART) capacity building toolbox found at
#' <http://smartmethodology.org/survey-planning-tools/smart-capacity-building-toolbox/>.
#'
#
################################################################################
"smartStd"


################################################################################
#
#'
#' Standardisation test data - sample 2
#'
Expand Down Expand Up @@ -95,13 +85,9 @@
#' (SMART) capacity building toolbox found at
#' <http://smartmethodology.org/survey-planning-tools/smart-capacity-building-toolbox/>.
#'
#
################################################################################
"smartStdLong"


################################################################################
#
#'
#' Standardisation test data - sample 3
#'
Expand All @@ -120,13 +106,9 @@
#' (SMART) capacity building toolbox found at
#' <http://smartmethodology.org/survey-planning-tools/smart-capacity-building-toolbox/>.
#'
#
################################################################################
"smartWide"


################################################################################
#
#'
#' Dataset from a standardisation exercise done in Liberia in preparation for
#' a coverage survey.
Expand All @@ -146,7 +128,4 @@
#' @examples
#' liberiaStdData
#'
#'
#
################################################################################
"liberiaStdData"
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ frac
measurers
muac
nolimits
nutriverse
org
sd
smartmethodology
Expand Down
1 change: 0 additions & 1 deletion man/liberiaStdData.Rd

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

0 comments on commit ec1d305

Please sign in to comment.