hugheylab / phers

https://phers.hugheylab.org
0 stars 0 forks source link

lintr found issues with code #79

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 2 years ago
  1. R/phers.R line 26: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L26)
    flag = icd = person_id = . = NULL   
  2. R/phers.R line 75: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L75)
    person_id = phecode = disease_id = w = score = . = NULL   
  3. R/phers.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L119)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL   
  4. R/phers.R line 200: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L200)
    occurrence_age = person_id = phecode = . = NULL   
  5. R/utils.R line 189: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L189)
    n_het = n_hom = n_wt = NULL   
  6. R/weights.R line 2: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L2)
    phecode = person_id = . = pred = w = NULL   
  7. R/weights.R line 12: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L12)
    phecode = person_id = . = w = phe = dx_status = pred = NULL   
  8. R/weights.R line 24: Commas should never have a space before. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L24)
    fit, newdata = .SD , type = 'response', se.fit = FALSE)]   
  9. R/weights.R line 34: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L34)
    phecode = person_id = . = w = phe = pred = num_occurrences = NULL   
  10. R/weights.R line 57: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L57)
    phecode = person_id = . = w = phe = dx_status = pred = occurrence_age =   
  11. R/weights.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L58)
    first_age = last_age = age2 = NULL   
  12. tests/testthat/test_phers.R line 138: Put spaces around all infix operators. (https://github.com/hugheylab/phers/blob/main/tests/testthat/test_phers.R#L138)
    method ='logistic', methodFormula = formTest,   

    To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

    
    filename,line_number,message,line
    R/phers.R,26,Variable and function name style should be camelCase.,flag = icd = person_id = . = NULL
    R/phers.R,75,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,119,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/phers.R,200,Variable and function name style should be camelCase.,occurrence_age = person_id = phecode = . = NULL
    R/utils.R,189,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/weights.R,2,Variable and function name style should be camelCase.,phecode = person_id = . = pred = w = NULL
    R/weights.R,12,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = dx_status = pred = NULL
    R/weights.R,24,Commas should never have a space before.,"fit, newdata = .SD , type = 'response', se.fit = FALSE)]"
    R/weights.R,34,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = pred = num_occurrences = NULL
    R/weights.R,57,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = dx_status = pred = occurrence_age =
    R/weights.R,58,Variable and function name style should be camelCase.,first_age = last_age = age2 = NULL
    tests/testthat/test_phers.R,138,Put spaces around all infix operators.,"method ='logistic', methodFormula = formTest,"
Warning, lint_ignore.csv contains lines not found in the current code:  
R/genetic_association.R line 55: Variable and function name style should be camelCase. 
    ```r 
    diseaseId = disease_id = snp = allele_count = count = N = variant_id = person_id = NULL  

R/genetic_association.R line 67: Variable and function name style should be camelCase.

    lmInput[, person_id := as.character(person_id)]  

R/genetic_association.R line 102: Variable and function name style should be camelCase.

    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het =  

R/genetic_association.R line 103: Variable and function name style should be camelCase.

    n_hom = n_total = n_wt = genotype = NULL  

R/genetic_association.R line 111: Variable and function name style should be camelCase.

    lmInput1[allele_count == 2, allele_count := 1]}  

R/genetic_association.R line 114: Variable and function name style should be camelCase.

    lmInput1[allele_count == 1, allele_count := 0]  

R/genetic_association.R line 115: Variable and function name style should be camelCase.

    lmInput1[allele_count == 2, allele_count := 1]}  

R/genetic_association.R line 118: Variable and function name style should be camelCase.

    lmInput1[, allele_count := as.factor(allele_count)]  

R/genetic_association.R line 135: Variable and function name style should be camelCase.

    lmStat[, ci_lower := ci[1L]]  

R/genetic_association.R line 136: Variable and function name style should be camelCase.

    lmStat[, ci_upper := ci[2L]]}  

R/genetic_diagnosis.R line 31: Variable and function name style should be camelCase.

    dx_status = entry_date = uniq_dates = . = NULL  

R/genetic_diagnosis.R line 46: Variable and function name style should be camelCase.

    dxIcd[, dx_status := -1L]  

R/genetic_diagnosis.R line 47: Variable and function name style should be camelCase.

    dxIcd[uniq_dates >= minUniqueDates, dx_status := 1L]  

R/genetic_diagnosis.R line 53: Variable and function name style should be camelCase.

    dxStatus[is.na(dx_status), dx_status := 0L]  

R/phers.R line 36: Variable and function name style should be camelCase.

    flag = icd = person_id = . = NULL  

R/phers.R line 77: Variable and function name style should be camelCase.

    phecode = person_id = . = prev = w = NULL  

R/phers.R line 114: Variable and function name style should be camelCase.

    person_id = phecode = disease_id = w = score = . = NULL  

R/phers.R line 158: Variable and function name style should be camelCase.

    disease_id = diseaseId = resid_score = . = person_id = score = NULL  

R/utils.R line 138: Variable and function name style should be camelCase.

    n_het = n_hom = n_wt = NULL  

R/utils.R line 140: Variable and function name style should be camelCase.

    dCounts[, n_wt := sum(lmInput$allele_count == 0)]  

R/utils.R line 141: Variable and function name style should be camelCase.

    dCounts[, n_het := sum(lmInput$allele_count == 1)]  

R/utils.R line 142: Variable and function name style should be camelCase.

    dCounts[, n_hom := sum(lmInput$allele_count == 2)]  

data-raw/phers_create_data.R line 88: Variable and function name style should be camelCase.

    icdSampleAll[, entry_date := sample(entryDates, nrow(icdSampleAll))]  

data-raw/phers_create_data.R line 95: Variable and function name style should be camelCase.

    icdSampleMarfan[, entry_date := sample(entryDates, nrow(icdSampleMarfan))]