hugheylab / phers

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

lintr found issues with code #81

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago
  1. R/genetic_diagnosis.R line 29: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L29)
    dx_status = occurrence_age = uniq_ages = . = NULL   
  2. 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   
  3. R/phers.R line 67: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L67)
    person_id = phecode = disease_id = w = score = . = NULL   
  4. R/phers.R line 105: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L105)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL   
  5. R/utils.R line 186: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L186)
    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 = dx_status = NULL   
  7. R/weights.R line 23: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L23)
    phecode = person_id = . = pred = w = dx_status = NULL   
  8. R/weights.R line 49: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L49)
    phecode = person_id = . = w = phe = dx_status = pred = NULL   
  9. R/weights.R line 61: Commas should never have a space before. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L61)
    fit, newdata = .SD , type = 'response', se.fit = FALSE)]   
  10. R/weights.R line 74: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L74)
    phecode = person_id = . = w = phe = pred = num_occurrences = NULL   
  11. R/weights.R line 96: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L96)
    phecode = person_id = . = w = phe = dx_status = pred = occurrence_age =   
  12. R/weights.R line 97: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/weights.R#L97)
    first_age = last_age = age2 = NULL   

    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/genetic_diagnosis.R,29,Variable and function name style should be camelCase.,dx_status = occurrence_age = uniq_ages = . = NULL
    R/phers.R,26,Variable and function name style should be camelCase.,flag = icd = person_id = . = NULL
    R/phers.R,67,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,105,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/utils.R,186,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 = dx_status = NULL
    R/weights.R,23,Variable and function name style should be camelCase.,phecode = person_id = . = pred = w = dx_status = NULL
    R/weights.R,49,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = dx_status = pred = NULL
    R/weights.R,61,Commas should never have a space before.,"fit, newdata = .SD , type = 'response', se.fit = FALSE)]"
    R/weights.R,74,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = pred = num_occurrences = NULL
    R/weights.R,96,Variable and function name style should be camelCase.,phecode = person_id = . = w = phe = dx_status = pred = occurrence_age =
    R/weights.R,97,Variable and function name style should be camelCase.,first_age = last_age = age2 = NULL
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))]