Skip to content

Commit d7895f6

Browse files
committed
Style code (GHA)
1 parent 8779a49 commit d7895f6

File tree

6 files changed

+36
-18
lines changed

6 files changed

+36
-18
lines changed

R/alcohol.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ low_drink_score_fun <- function(CLC_SEX, ALC_11, ALCDWKY) {
119119
#' # Expected output: 2
120120
#'
121121
#' # Vector usage: Multiple respondents
122-
#' low_drink_score_fun1(CLC_SEX = c(1, 2, 1), ALC_11 = c(1, 1, 2),
123-
#' ALCDWKY = c(3, 12, NA), ALC_17 = c(1, 1, 1), ALC_18 = c(2, 2, 1))
122+
#' low_drink_score_fun1(
123+
#' CLC_SEX = c(1, 2, 1), ALC_11 = c(1, 1, 2),
124+
#' ALCDWKY = c(3, 12, NA), ALC_17 = c(1, 1, 1), ALC_18 = c(2, 2, 1)
125+
#' )
124126
#' # Returns: c(2, 3, 2)
125127
#'
126128
#' # Database usage: Applied to survey datasets

R/blood-pressure.R

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ adjust_DBP <- function(BPMDPBPD) {
115115
#' # Output: 2 (Normal blood pressure as BP is below 140/90 mmHg and not on medication).
116116
#'
117117
#' # Vector usage: Multiple respondents
118-
#' determine_hypertension(BPMDPBPS = c(150, 120, 135), BPMDPBPD = c(95, 80, 85),
119-
#' ANYMED2 = c(1, 0, 1), DIABX = c(2, 2, 1))
118+
#' determine_hypertension(
119+
#' BPMDPBPS = c(150, 120, 135), BPMDPBPD = c(95, 80, 85),
120+
#' ANYMED2 = c(1, 0, 1), DIABX = c(2, 2, 1)
121+
#' )
120122
#' # Returns: c(1, 2, 1)
121123
#'
122124
#' @export
@@ -191,8 +193,10 @@ determine_hypertension <- function(BPMDPBPS, BPMDPBPD, ANYMED2, CCC_32 = 2, CARD
191193
#' # Output: 2 (Normal blood pressure as adjusted BP is below 140/90 mmHg and not on medication).
192194
#'
193195
#' # Vector usage: Multiple respondents
194-
#' determine_adjusted_hypertension(SBP_adj = c(150, 120, 135), DBP_adj = c(95, 80, 85),
195-
#' ANYMED2 = c(1, 0, 1), DIABX = c(2, 2, 1))
196+
#' determine_adjusted_hypertension(
197+
#' SBP_adj = c(150, 120, 135), DBP_adj = c(95, 80, 85),
198+
#' ANYMED2 = c(1, 0, 1), DIABX = c(2, 2, 1)
199+
#' )
196200
#' # Returns: c(1, 2, 1)
197201
#'
198202
#' @export
@@ -267,8 +271,10 @@ determine_adjusted_hypertension <- function(SBP_adj, DBP_adj, ANYMED2, CCC_32 =
267271
#' # Output: 1 (Hypertension controlled as BP is below 140/90 mmHg and on medication).
268272
#'
269273
#' # Vector usage: Multiple respondents
270-
#' determine_controlled_hypertension(BPMDPBPS = c(150, 120, 135), BPMDPBPD = c(95, 80, 85),
271-
#' ANYMED2 = c(1, 1, 1), DIABX = c(2, 2, 1))
274+
#' determine_controlled_hypertension(
275+
#' BPMDPBPS = c(150, 120, 135), BPMDPBPD = c(95, 80, 85),
276+
#' ANYMED2 = c(1, 1, 1), DIABX = c(2, 2, 1)
277+
#' )
272278
#' # Returns: c(2, 1, 2)
273279
#'
274280
#' @export
@@ -346,8 +352,10 @@ determine_controlled_hypertension <- function(BPMDPBPS, BPMDPBPD, ANYMED2, CCC_3
346352
#' # Output: 1 (Hypertension controlled as adjusted BP is below 140/90 mmHg and on medication).
347353
#'
348354
#' # Vector usage: Multiple respondents
349-
#' determine_controlled_adjusted_hypertension(SBP_adj = c(150, 120, 135), DBP_adj = c(95, 80, 85),
350-
#' ANYMED2 = c(1, 1, 1), DIABX = c(2, 2, 1))
355+
#' determine_controlled_adjusted_hypertension(
356+
#' SBP_adj = c(150, 120, 135), DBP_adj = c(95, 80, 85),
357+
#' ANYMED2 = c(1, 1, 1), DIABX = c(2, 2, 1)
358+
#' )
351359
#' # Returns: c(2, 1, 2)
352360
#'
353361
#' @export

R/exercise.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
#' # Output: 35 (The average minutes of exercise per day across the week is 35 minutes.)
2424
#'
2525
#' # Vector usage: Multiple respondents
26-
#' find_week_accelerometer_average(c(30, 20), c(40, 30), c(25, 35), c(35, 45),
27-
#' c(20, 25), c(45, 55), c(50, 60))
26+
#' find_week_accelerometer_average(
27+
#' c(30, 20), c(40, 30), c(25, 35), c(35, 45),
28+
#' c(20, 25), c(45, 55), c(50, 60)
29+
#' )
2830
#' # Returns: c(35, 39.28571)
2931
#'
3032
#' @export

R/family-history.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ determine_CVD_personal_history <- function(CCC_61, CCC_63, CCC_81) {
7272
#' # Output: 1
7373
#'
7474
#' # Vector usage: Multiple respondents
75-
#' determine_CVD_family_history(FMH_11 = c(1, 2, 1), FMH_12 = c(50, NA, 70),
76-
#' FMH_13 = c(2, 1, 2), FMH_14 = c(NA, 55, NA))
75+
#' determine_CVD_family_history(
76+
#' FMH_11 = c(1, 2, 1), FMH_12 = c(50, NA, 70),
77+
#' FMH_13 = c(2, 1, 2), FMH_14 = c(NA, 55, NA)
78+
#' )
7779
#' # Returns: c(1, 1, 2)
7880
#'
7981
#' # Database usage: Applied to survey datasets

R/kidney.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
#' # Output: GFR = 99.94114
3838
#'
3939
#' # Vector usage: Multiple respondents
40-
#' calculate_GFR(LAB_BCRE = c(80, 70, 90), PGDCGT = c(1, 2, 1),
41-
#' CLC_SEX = c(2, 2, 1), CLC_AGE = c(45, 35, 50))
40+
#' calculate_GFR(
41+
#' LAB_BCRE = c(80, 70, 90), PGDCGT = c(1, 2, 1),
42+
#' CLC_SEX = c(2, 2, 1), CLC_AGE = c(45, 35, 50)
43+
#' )
4244
#' # Returns: c(67.27905, 99.94114, 70.38001)
4345
#'
4446
#' # Database usage: Applied to survey datasets

R/medications.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,8 +1383,10 @@ cycles1to2_other_antiHTN_meds <- function(
13831383
#' mhr_102b = c(1, as.numeric(NA), 1)
13841384
#' )
13851385
#' survey_data %>%
1386-
#' mutate(is_taking_any_antihtn =
1387-
#' cycles1to2_any_antiHTN_meds(atc_101a, atc_102a, mhr_101b, mhr_102b)) %>%
1386+
#' mutate(
1387+
#' is_taking_any_antihtn =
1388+
#' cycles1to2_any_antiHTN_meds(atc_101a, atc_102a, mhr_101b, mhr_102b)
1389+
#' ) %>%
13881390
#' select(is_taking_any_antihtn)
13891391
#'
13901392
#' @seealso `is_any_antiHTN_med`

0 commit comments

Comments
 (0)