hugheylab / phers

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

lintr found issues with code #75

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/genetic_diagnosis.R line 31: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L31)
    dx_status = entry_date = uniq_dates = . = NULL   
  2. R/genetic_diagnosis.R line 46: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L46)
    dxIcd[, dx_status := -1L]   
  3. R/genetic_diagnosis.R line 47: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L47)
    dxIcd[uniq_dates >= minUniqueDates, dx_status := 1L]   
  4. R/genetic_diagnosis.R line 53: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L53)
    dxStatus[is.na(dx_status), dx_status := 0L]   

    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,31,Variable and function name style should be camelCase.,dx_status = entry_date = uniq_dates = . = NULL
    R/genetic_diagnosis.R,46,Variable and function name style should be camelCase.,"dxIcd[, dx_status := -1L]"
    R/genetic_diagnosis.R,47,Variable and function name style should be camelCase.,"dxIcd[uniq_dates >= minUniqueDates, dx_status := 1L]"
    R/genetic_diagnosis.R,53,Variable and function name style should be camelCase.,"dxStatus[is.na(dx_status), dx_status := 0L]"
Warning, lint_ignore.csv contains lines not found in the current code:  
R/genetic_association.R line 56: Variable and function name style should be camelCase. 
    ```r 
    diseaseId = disease_id = snp = allele_count = count = N = vid = person_id = NULL  

R/genetic_association.R line 68: 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 = 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.

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

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

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

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

    dx_status = entry_date = uniq_dates = . = NULL  

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

    dxIcd[, dx_status := -1L]  

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

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

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

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

R/phers.R line 37: 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))]