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

Allow for CONTENT_AREA renaming of GoFit plots via SGPstateData #1434

Merged
merged 5 commits into from
Apr 19, 2024
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
13 changes: 10 additions & 3 deletions R/gofSGP.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ function(
tmp.colors <- .cell.color(as.vector(tmp.table))
tmp.list <- list()

if (!is.null(state)) {
if (!is.null(SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]])) {
content_area_title <-
SGPstateData[[state]][["Student_Report_Information"]][["Content_Areas_Labels"]][[content_area]]
} else content_area_title <- content_area
} else content_area_title <- content_area

for (i in levels(tmp.cuts)) {
tmp.list[[i]] <- quantile(data1$SGP[tmp.cuts==i], probs=ppoints(1:500), na.rm=TRUE)
}
Expand Down Expand Up @@ -306,7 +313,7 @@ function(

roundrectGrob(gp=gpar(fill="grey95"), vp="title", r=unit(3, "mm")),
textGrob(x=0.5, y=0.65, "Student Growth Percentile Goodness-of-Fit Descriptives", gp=gpar(cex=1.75), vp="title"),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area, my.extra.label))),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area_title, my.extra.label))),
", Grade ", grade, " (N = ", format(dim(data1)[1], big.mark=","), ")"), vp="title", gp=gpar(cex=1.2)),

### prior_achievement_level
Expand Down Expand Up @@ -396,7 +403,7 @@ function(

roundrectGrob(gp=gpar(fill="grey95"), vp="title", r=unit(3, "mm")),
textGrob(x=0.5, y=0.65, "Student Growth Percentile Goodness-of-Fit Descriptives", gp=gpar(cex=1.75), vp="title"),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area, my.extra.label))),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area_title, my.extra.label))),
", Grade ", grade, " (N = ", format(dim(data1)[1], big.mark=","), ")"), vp="title", gp=gpar(cex=1.2)),

### LOSS/HOSS table
Expand Down Expand Up @@ -457,7 +464,7 @@ function(

roundrectGrob(gp=gpar(fill="grey95"), vp="title", r=unit(3, "mm")),
textGrob(x=0.5, y=0.65, "Student Growth Percentile Goodness-of-Fit Descriptives", gp=gpar(cex=1.75), vp="title"),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area, my.extra.label))),
textGrob(x=0.5, y=0.35, paste0(pretty_year(year), " ", sub(' +$', '', capwords(paste(content_area_title, my.extra.label))),
", Grade ", grade, " (N = ", format(dim(data1)[1], big.mark=","), ")"), vp="title", gp=gpar(cex=1.2)),

### table
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SGP
[![R-CMD-check](https://github.com/CenterForAssessment/SGP/workflows/R-CMD-check/badge.svg)](https://github.com/CenterForAssessment/SGP/actions)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/centerforassessment/SGP?branch=master&svg=true)](https://ci.appveyor.com/project/centerforassessment/SGP)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/SGP)](https://cran.r-project.org/package=SGP)
[![Development Version](https://img.shields.io/badge/devel-2.1--0.0-brightgreen.svg)](https://github.com/CenterForAssessment/SGP)
[![Development Version](https://img.shields.io/badge/devel-2.1--0.4-brightgreen.svg)](https://github.com/CenterForAssessment/SGP)
[![Rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/SGP)](https://github.com/metacran/cranlogs.app)
[![License](https://img.shields.io/badge/license-GPL%203-brightgreen.svg?style=flat)](https://github.com/CenterForAssessment/SGP/blob/master/LICENSE.md)
[![Join the chat at https://gitter.im/CenterForAssessment/SGP](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CenterForAssessment/SGP?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand Down Expand Up @@ -56,7 +56,7 @@ We love feedback and are happy to answer questions.

# References

Betebenner, D. W., VanIwaarden, A., Domingue, B., and Shang, Y. (2023). SGP: Student Growth Percentiles & Percentile Growth Trajectories.
Betebenner, D. W., VanIwaarden, A., Domingue, B., and Shang, Y. (2024). SGP: Student Growth Percentiles & Percentile Growth Trajectories.

R Core Team (2023). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL
R Core Team (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL
https://www.R-project.org/.
Loading