Skip to content

Commit 0a14727

Browse files
committed
Style code (GHA)
1 parent 66565da commit 0a14727

File tree

7 files changed

+44
-44
lines changed

7 files changed

+44
-44
lines changed

R/alcohol.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@
3434
#' - 5–9 points -> score of 4 ("High risk").
3535
#'
3636
#' @details
37-
#' This function implements Canada's Low-Risk Alcohol Drinking Guidelines (Step 1 only) to assess
38-
#' alcohol consumption risk. The scoring system considers both the quantity of alcohol consumed
37+
#' This function implements Canada's Low-Risk Alcohol Drinking Guidelines (Step 1 only) to assess
38+
#' alcohol consumption risk. The scoring system considers both the quantity of alcohol consumed
3939
#' and biological sex differences in alcohol metabolism.
40-
#'
40+
#'
4141
#' **Risk Categories:**
4242
#' - Low risk (0 points): Safe consumption levels
4343
#' - Marginal risk (1-2 points): Slightly elevated risk
4444
#' - Medium risk (3-4 points): Moderate health concerns
4545
#' - High risk (5-9 points): Significant health risks
46-
#'
46+
#'
4747
#' **Sex-Based Differences:**
48-
#' Women generally have lower tolerance thresholds due to physiological differences in
48+
#' Women generally have lower tolerance thresholds due to physiological differences in
4949
#' alcohol metabolism, reflected in the sex-specific point allocations.
50-
#'
50+
#'
5151
#' **Non-response Handling:**
5252
#' Invalid inputs or survey non-response values result in tagged NA ("b").
5353
#'
5454
#' @note
55-
#' This function implements only Step 1 of the guidelines. Step 2 (additional drinking pattern
55+
#' This function implements only Step 1 of the guidelines. Step 2 (additional drinking pattern
5656
#' assessments) is not included due to data limitations in the survey.
5757
#'
5858
#' @examples

R/blood-pressure.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#'
99
#' @return [numeric] The adjusted systolic blood pressure as a numeric.
1010
#'
11-
#' @details Blood pressure measurements in survey settings may require adjustment to account for
11+
#' @details Blood pressure measurements in survey settings may require adjustment to account for
1212
#' measurement conditions and equipment differences. This function applies a standardized adjustment
1313
#' using the formula: SBP_adj = 11.4 + (0.93 * BPMDPBPS).
14-
#'
15-
#' Non-response handling: Values >= 996 indicate survey non-response and are converted to
16-
#' tagged NA ("b") to distinguish from missing measurements. Negative values are also
14+
#'
15+
#' Non-response handling: Values >= 996 indicate survey non-response and are converted to
16+
#' tagged NA ("b") to distinguish from missing measurements. Negative values are also
1717
#' treated as invalid and converted to tagged NA.
1818
#'
1919
#' @examples
@@ -51,12 +51,12 @@ adjust_SBP <- function(BPMDPBPS) {
5151
#'
5252
#' @return [numeric] The adjusted diastolic blood pressure as a numeric.
5353
#'
54-
#' @details Blood pressure measurements in survey settings may require adjustment to account for
54+
#' @details Blood pressure measurements in survey settings may require adjustment to account for
5555
#' measurement conditions and equipment differences. This function applies a standardized adjustment
5656
#' using the formula: DBP_adj = 15.6 + (0.83 * BPMDPBPD).
57-
#'
58-
#' Non-response handling: Values >= 996 indicate survey non-response and are converted to
59-
#' tagged NA ("b") to distinguish from missing measurements. Negative values are also
57+
#'
58+
#' Non-response handling: Values >= 996 indicate survey non-response and are converted to
59+
#' tagged NA ("b") to distinguish from missing measurements. Negative values are also
6060
#' treated as invalid and converted to tagged NA.
6161
#'
6262
#' @examples
@@ -130,15 +130,15 @@ adjust_DBP <- function(BPMDPBPD) {
130130
#' # Returns: c(1, 2, 1)
131131
#'
132132
#' @details This function implements clinical guidelines for hypertension classification:
133-
#'
133+
#'
134134
#' **Blood Pressure Thresholds:**
135135
#' - General population: >= 140/90 mmHg indicates hypertension
136136
#' - Diabetes or CKD patients: >= 130/80 mmHg indicates hypertension (lower threshold)
137-
#'
137+
#'
138138
#' **Medication Logic:**
139139
#' - Anyone taking hypertension medication is classified as hypertensive
140140
#' - Medication status may be adjusted based on comorbidities (diabetes, CKD, cardiovascular disease)
141-
#'
141+
#'
142142
#' **Non-response Handling:**
143143
#' - Values >= 996 indicate survey non-response codes
144144
#' - Invalid blood pressure readings result in tagged NA ("b")

R/diabetes.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @title Diabetes derived variable
22
#'
3-
#' @description This function evaluates diabetes status using a comprehensive approach that combines
4-
#' laboratory measurements, self-reported diagnosis, and medication usage to create an inclusive
3+
#' @description This function evaluates diabetes status using a comprehensive approach that combines
4+
#' laboratory measurements, self-reported diagnosis, and medication usage to create an inclusive
55
#' diabetes classification.
66
#'
77
#' @param diab_m [integer] An integer indicating whether the respondent has diabetes based on HbA1c level. 1 for "Yes", 2 for "No".
@@ -39,20 +39,20 @@
3939
#' # mutate(diabetes_status = determine_inclusive_diabetes(diab_m, CCC_51, diab_drug2))
4040
#'
4141
#' @details This function classifies diabetes status based that considers:
42-
#'
42+
#'
4343
#' **Data Sources:**
4444
#' - Laboratory: HbA1c levels indicating diabetes (diab_m)
4545
#' - Self-report: Participant-reported diabetes diagnosis (CCC_51)
4646
#' - Medication: Current diabetes medication usage (diab_drug2)
47-
#'
47+
#'
4848
#' **Classification Logic:**
4949
#' - ANY positive indicator results in diabetes classification
5050
#' - ALL negative indicators required for "no diabetes" classification
5151
#' - Sophisticated missing data handling preserves available information
52-
#'
52+
#'
5353
#' **Missing Data Strategy:**
54-
#' The function maximizes data utility by making classifications based on available
55-
#' information when some parameters are missing, only returning NA when insufficient
54+
#' The function maximizes data utility by making classifications based on available
55+
#' information when some parameters are missing, only returning NA when insufficient
5656
#' data exists for classification.
5757
#'
5858
#' @seealso Related health condition functions: [determine_hypertension()], [calculate_GFR()]

R/exercise.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
#' )
3030
#' # Returns: c(35, 39.28571)
3131
#'
32-
#' @details This function processes physical activity data from accelerometer measurements
32+
#' @details This function processes physical activity data from accelerometer measurements
3333
#' to create a weekly activity summary.
34-
#'
34+
#'
3535
#' **Data Quality Requirements:**
3636
#' - Requires complete 7-day data (missing days result in tagged NA)
3737
#' - This conservative approach ensures reliable activity estimates
3838
#' - Zero values are preserved (represent valid no-activity days)
39-
#'
39+
#'
4040
#' **Clinical Context:**
4141
#' Accelerometer data provides objective measures of moderate-to-vigorous physical activity (MVPA),
4242
#' crucial for assessing adherence to physical activity guidelines.

R/income.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
#' DHHDHSZ) are non-response values (THI_01 >= 996, DHHDHSZ >= 996), the adjusted household income will be
1111
#' NA(b) (Not Available).
1212
#'
13-
#' @details This function applies equivalence scales to adjust household income for household size,
13+
#' @details This function applies equivalence scales to adjust household income for household size,
1414
#' allowing for meaningful income comparisons across different household compositions.
15-
#'
15+
#'
1616
#' **Equivalence Scale Logic:**
1717
#' - First adult: Weight = 1.0 (full weight)
1818
#' - Second adult: Weight = 0.4 (economies of scale)
1919
#' - Additional members: Weight = 0.3 each (further economies)
20-
#'
20+
#'
2121
#' **Examples:**
2222
#' - Single person: weight = 1.0
2323
#' - Two adults: weight = 1.4 (1.0 + 0.4)
2424
#' - Family of four: weight = 2.0 (1.0 + 0.4 + 0.3 + 0.3)
25-
#'
25+
#'
2626
#' **Non-response Handling:**
2727
#' Income values >= 996 or household size <= 0 indicate survey non-response and result in tagged NA ("b").
2828
#'

R/kidney.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@
1111
#' @return [numeric] The calculated GFR. If any of the input parameters (LAB_BCRE, PGDCGT, CLC_SEX, CLC_AGE)
1212
#' are non-response values (LAB_BCRE >= 996, PGDCGT >= 96, CLC_SEX >= 6, CLC_AGE >= 996) or out of bounds, the GFR will be NA(b).
1313
#'
14-
#' @details This function implements the Modification of Diet in Renal Disease (MDRD) equation
14+
#' @details This function implements the Modification of Diet in Renal Disease (MDRD) equation
1515
#' to estimate glomerular filtration rate, a key indicator of kidney function.
16-
#'
16+
#'
1717
#' **Clinical Significance:**
1818
#' GFR estimates are essential for:
1919
#' - Chronic kidney disease (CKD) classification
2020
#' - Medication dosing adjustments
2121
#' - Cardiovascular risk assessment
22-
#'
22+
#'
2323
#' **Formula Application:**
2424
#' Base: GFR = 175 × (creatinine^-1.154) × (age^-0.203)
2525
#' Adjustments:
2626
#' - Female: × 0.742
2727
#' - Black ethnicity: × 1.210
28-
#'
28+
#'
2929
#' **Unit Conversion:**
3030
#' Serum creatinine converted from µmol/L to mg/dL (÷ 88.4)
31-
#'
31+
#'
3232
#' **Non-response Handling:**
33-
#' Values >= 996 (LAB_BCRE), >= 96 (PGDCGT), >= 6 (CLC_SEX), >= 996 (CLC_AGE)
33+
#' Values >= 996 (LAB_BCRE), >= 96 (PGDCGT), >= 6 (CLC_SEX), >= 996 (CLC_AGE)
3434
#' indicate survey non-response and result in tagged NA ("b").
3535
#'
3636
#' @examples

R/smoking.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,20 @@
6464
#'
6565
#' @export
6666
#'
67-
#' @details Pack-years is a standardized measure of lifetime cigarette exposure used in epidemiological
67+
#' @details Pack-years is a standardized measure of lifetime cigarette exposure used in epidemiological
6868
#' research and clinical practice. The calculation varies by smoking pattern:
69-
#'
69+
#'
7070
#' **Smoking Patterns:**
7171
#' - Daily smokers: Consistent daily consumption over time period
7272
#' - Occasional smokers: Variable consumption adjusted for frequency
7373
#' - Former smokers: Historical consumption during smoking periods
74-
#'
74+
#'
7575
#' **Minimum Values:**
76-
#' The function applies minimum pack-year values (0.0137 or 0.007) to prevent
76+
#' The function applies minimum pack-year values (0.0137 or 0.007) to prevent
7777
#' underestimation of health risks for light smokers.
78-
#'
78+
#'
7979
#' **Clinical Significance:**
80-
#' Pack-years data is crucial for lung cancer screening guidelines, COPD risk
80+
#' Pack-years data is crucial for lung cancer screening guidelines, COPD risk
8181
#' assessment, and cardiovascular disease evaluation.
8282
#'
8383
#' @seealso https://big-life-lab.github.io/cchsflow/reference/pack_years_fun.html

0 commit comments

Comments
 (0)