Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix erroneous missing data and update names #126

Merged
merged 9 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Package: growthcleanr
Type: Package
Title: Data Cleaner for Anthropometric Measurements
Version: 2.1.0
Version: 2.1.1
Authors@R: c(
person("Daymont","Carrie", email = "[email protected]", role = c("ctb","cre")),
person("Grundmeier","Robert", role = "aut"),
person("Miller","Jeffrey", role = "aut"),
person("Campos","Diego", role = "aut"),
person("Chudnov","Dan", role = "ctb"),
person("De los Santos","Hannah", email = "[email protected]", role = c("ctb")),
person("Cao","Lusha", role = "ctb"),
person("Silva","Steffani", role = "ctb"),
person("Zhang","Hanzhe", role = "ctb"),
person("Boyas","Matt", role = "ctb"),
person("Freedman","David", role = "ctb"),
person("Achilleos","Andreas", role = "ctb"),
person("Butts","Jessica", role = "ctb"),
person("Nguyen","Sheila", role = "ctb"),
person("Soleymani","Taraneh", role = "ctb"),
person("Olivier","Max", role = "ctb")
person("Carrie", "Daymont", email = "[email protected]", role = c("ctb","cre")),
person("Robert", "Grundmeier", role = "aut"),
person("Jeffrey", "Miller", role = "aut"),
person("Diego", "Campos", role = "aut"),
person("Dan", "Chudnov", email = "[email protected]", role = "ctb"),
person("Hannah", "De los Santos", email = "[email protected]", role = c("ctb")),
person("Lusha", "Cao", role = "ctb"),
person("Steffani", "Silva", role = "ctb"),
person("Hanzhe", "Zhang", role = "ctb"),
person("Matt", "Boyas", role = "ctb"),
person("David", "Freedman", role = "ctb"),
person("Andreas", "Achilleos", role = "ctb"),
person("Jessica", "Butts", role = "ctb"),
person("Sheila", "Nguyen", role = "ctb"),
person("Taraneh", "Soleymani", role = "ctb"),
person("Max", "Olivier", role = "ctb")
)
Description: Identifies implausible anthropometric (e.g., height,
weight) measurements in irregularly spaced longitudinal datasets, such as those from electronic health records.
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# growthcleanr 2.1.1 - 2023-03-01

## Changed

- Fixed missing adult measurements to be labeled "Missing" in output (#119)
- Added tests for missingness in adult output
- Fixed missing "-RV" codes in adult output
- Corrected contributor names in DESCRIPTION (#120)
- Added email for Dan Chudnov in DESCRIPTION (#95)

# growthcleanr 2.1.0 - 2023-02-03

## Added
Expand Down
10 changes: 10 additions & 0 deletions R/growth.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ cleangrowth <- function(subjid,
N <- age_years <- batch <- exclude <- index <- line <- NULL
newbatch <- sd.median <- sd.orig <- tanner.months <- tbc.sd <- NULL
v <- v_adult <- whoagegrp.ht <- whoagegrp_ht <- z.orig <- NULL
result <- NULL

# preprocessing ----

Expand Down Expand Up @@ -239,8 +240,11 @@ cleangrowth <- function(subjid,
"Include",
"Exclude-Adult-BIV",
"Exclude-Adult-Hundreds",
"Exclude-Adult-Hundreds-RV",
"Exclude-Adult-Unit-Errors",
"Exclude-Adult-Unit-Errors-RV",
"Exclude-Adult-Transpositions",
"Exclude-Adult-Transpositions-RV",
"Exclude-Adult-Weight-Cap-Identical",
"Exclude-Adult-Weight-Cap",
"Exclude-Adult-Swapped-Measurements",
Expand All @@ -249,6 +253,7 @@ cleangrowth <- function(subjid,
"Exclude-Adult-Distinct-Pairs",
"Exclude-Adult-Distinct-3-Or-More",
"Exclude-Adult-EWMA-Extreme",
"Exclude-Adult-EWMA-Extreme-RV",
"Exclude-Adult-Distinct-Ordered-Pairs",
"Exclude-Adult-EWMA-Moderate",
"Exclude-Adult-Possibly-Impacted-By-Weight-Cap",
Expand Down Expand Up @@ -652,8 +657,13 @@ cleangrowth <- function(subjid,
.paropts = list(.packages = "data.table"),
weight_cap = weight_cap
)

res <- as.data.table(res)
}

# replace result with missing if measurement or agedays are missing
res[is.na(measurement) | agedays < 0, result := "Missing"]

if (parallel){
stopCluster(cl)
}
Expand Down
12 changes: 10 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# CRAN submission growthcleanr 2.1.1

## R CMD check results
There were no ERRORs, WARNINGs, or NOTEs.

## Downstream dependencies
There are currently no downstream dependencies for this package.

# Previous Submissions

# CRAN submission growthcleanr 2.1.0

## R CMD check results
Expand All @@ -19,8 +29,6 @@ We have addressed each of the notes in the manual test as below:

We have updated the citation accordingly.

# Previous Submissions

# CRAN submission growthcleanr 2.1.0 (1)

## R CMD check results
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/adult-algorithm.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/configuration.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/developer-guidelines.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions docs/articles/installation.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading