From 4c876b41769f1bc00ca9755e6a5e7f0319c6e119 Mon Sep 17 00:00:00 2001 From: Damian Betebenner Date: Thu, 6 Jun 2024 06:21:01 -0400 Subject: [PATCH] Fixing edge case issue with getTargetData --- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/combineSGP.R | 2 +- R/gofSGP.R | 4 ++-- R/zzz.R | 2 +- inst/CITATION | 4 ++-- man/SGP-package.Rd | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 360397af..705a357e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -11,7 +11,7 @@ authors: - family-names: "Yi" given-names: "Shang" title: "SGP: Student Growth Percentiles & Percentile Growth Trajectories" -version: 2.1-0.8 +version: 2.1-0.10 doi: 10.5281/zenodo.3634024 -date-released: 2024-5-22 +date-released: 2024-6-6 url: "https://sgp.io" diff --git a/DESCRIPTION b/DESCRIPTION index 6d5c76b5..e7267fdb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: SGP Type: Package Title: Student Growth Percentiles & Percentile Growth Trajectories -Version: 2.1-0.9 -Date: 2024-5-23 +Version: 2.1-0.10 +Date: 2024-6-6 Authors@R: c(person(given=c("Damian", "W."), family="Betebenner", email="dbetebenner@nciea.org", role=c("aut", "cre")), person(given=c("Adam", "R."), family="Van Iwaarden", email="avaniwaarden@nciea.org", role="aut"), person(given="Ben", family="Domingue", email="ben.domingue@gmail.com", role="aut"), diff --git a/R/combineSGP.R b/R/combineSGP.R index ba6a7c08..2abfdfef 100644 --- a/R/combineSGP.R +++ b/R/combineSGP.R @@ -217,7 +217,7 @@ function( if ("YEAR_WITHIN" %in% names(tmp.target.data)) { tmp.var.names <- c("ID", "CONTENT_AREA", "YEAR", "YEAR_WITHIN", intersect(names(tmp.target.data), c("GRADE", "SGP_PROJECTION_GROUP_SCALE_SCORES"))) } else tmp.var.names <- c("ID", "CONTENT_AREA", "YEAR", intersect(names(tmp.target.data), c("GRADE", "SGP_PROJECTION_GROUP_SCALE_SCORES"))) - tmp.data <- tmp.target.data[SGP_PROJECTION_GROUP==projection_group.iter, c(tmp.var.names, tmp.target.level.names), with=FALSE] + tmp.data <- tmp.target.data[SGP_PROJECTION_GROUP==projection_group.iter, intersect(c(tmp.var.names, tmp.target.level.names), names(tmp.target.data)), with=FALSE] na.omit(tmp.data, cols=grep("MOVE_UP_STAY_UP", tmp.target.level.names, invert=TRUE, value=TRUE)) } diff --git a/R/gofSGP.R b/R/gofSGP.R index 7e29b31f..3184df14 100644 --- a/R/gofSGP.R +++ b/R/gofSGP.R @@ -204,9 +204,9 @@ function( tmp.list <- list() if (!is.null(state)) { - if (!is.null(SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]])) { + if (!is.null(SGP::SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]])) { content_area_title <- - SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]] + SGP::SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]] } else content_area_title <- content_area } else content_area_title <- content_area diff --git a/R/zzz.R b/R/zzz.R index 7be37117..c0eba6e0 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -7,6 +7,6 @@ function(libname, pkgname) { `.onAttach` <- function(libname, pkgname) { if (interactive()) { - packageStartupMessage(magenta$bold('SGP',paste(paste0(unlist(strsplit(as.character(packageVersion("SGP")), "[.]")), c(".", "-", ".", "")), collapse=""),' (5-24-2024). For help: >help("SGP") or visit sgp.io')) + packageStartupMessage(magenta$bold('SGP',paste(paste0(unlist(strsplit(as.character(packageVersion("SGP")), "[.]")), c(".", "-", ".", "")), collapse=""),' (6-6-2024). For help: >help("SGP") or visit sgp.io')) } } diff --git a/inst/CITATION b/inst/CITATION index c22a95a7..76d89079 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -9,12 +9,12 @@ bibentry( person(given = c("Yi"), family = "Shang") ), year = "2024", - note = "R package version 2.1-0.9", + note = "R package version 2.1-0.10", url = "https://sgp.io", textVersion = paste( "Damian W. Betebenner, Adam R. Van Iwaarden, Benjamin Domingue and Yi Shang (2024).", "SGP: Student Growth Percentiles & Percentile Growth Trajectories.", - "(R package version 2.1-0.9)", + "(R package version 2.1-0.10)", "URL: https://sgp.io" ) ) diff --git a/man/SGP-package.Rd b/man/SGP-package.Rd index d4194fae..90dab178 100644 --- a/man/SGP-package.Rd +++ b/man/SGP-package.Rd @@ -19,8 +19,8 @@ growth projections to be calculated across assessment transitions by equating th \tabular{ll}{ Package: \tab SGP\cr Type: \tab Package\cr -Version: \tab 2.1-0.9\cr -Date: \tab 2024-5-24\cr +Version: \tab 2.1-0.10\cr +Date: \tab 2024-6-6\cr License: \tab GPL-3\cr LazyLoad: \tab yes\cr }