diff --git a/DESCRIPTION b/DESCRIPTION index c393b77..54505b0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,14 @@ Package: SGPmatrices Type: Package Title: Baseline Coefficient Matrices for SGP Analyses -Version: 0.1-1.0 -Date: 2024-12-3 +Version: 0.1-2.0 +Date: 2025-4-21 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")) Maintainer: Damian W. Betebenner Depends: R (>= 4.0) Suggests: SGP (>= 1.9-0.0), knitr, rmarkdown -Imports: crayon, toOrdinal +Imports: crayon, pkgsearch, toOrdinal Description: Baseline coefficient matrices for SGP analyses. URL: https://github.com/CenterForAssessment/SGPmatrices VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index 65b7682..2b18185 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,4 @@ -importFrom(utils,packageVersion) -importFrom(crayon,bold,green,magenta,red,yellow) +importFrom(crayon,bold,cyan,green,magenta,red) importFrom("toOrdinal", "toOrdinalDate") +importFrom(utils,packageDescription) export(addBaselineMatrices) diff --git a/R/zzz.R b/R/zzz.R index cf7b5f4..dd12d4c 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -2,20 +2,47 @@ function(libname, pkgname) { } -.onAttach <- function(libname, pkgname) { +`.onAttach` <- function(libname, pkgname) { if (interactive()) { + # Utility function + get_dev_version <- function(package) { + url <- paste0("https://raw.githubusercontent.com/CenterForAssessment/", package, "/refs/heads/master/DESCRIPTION") + tryCatch({ + lines <- readLines(url, warn = FALSE) + version_line <- grep("^Version:", lines, value = TRUE) + if (length(version_line) > 0) { + return(cyan("v", strsplit(version_line, ": ")[[1]][2], sep="")) + } else { + return(red("Not Available")) + } + }, error = function(e) { + return(red("Not Available")) + }, warning = function(w) { + return(red("Not Available")) + }) + } + # Extract version information - version <- utils::packageVersion("SGPmatrices") + installed.version <- utils::packageDescription("SGPmatrices")[['Version']] + cran.version <- tryCatch( + green("v", pkgsearch::cran_package("SGPmatrices")[['Version']], sep=""), + error = function(e) red("Not Available"), + warning = function(w) red("Not Available")) + dev.version <- get_dev_version("SGPmatrices") # Define a friendly startup message - message_text <- paste0( - magenta(bold("\uD83C\uDF89 SGPmatrices v", version)), " - ", toOrdinal::toOrdinalDate("2024-12-3"), "\n", - "\U1F4A1 Tip: ", magenta(bold("> help(\"SGPmatrices\")")), "\n", - "\U1F310 Docs: ", magenta(bold("https://centerforassessment.github.io/SGPmatrices")), "\n", - "\u2728 Happy SGPing!" - ) + message_text <- paste0( + magenta(bold("\uD83C\uDF89 SGPmatrices v", installed.version, sep="")), " - ", toOrdinal::toOrdinalDate("2025-4-21"), "\n", + strrep("\u2501", 40), "\n", + bold("\U1F4E6 CRAN: "), cran.version, "\n", + bold("\U1F527 Dev: "), dev.version, "\n", + strrep("\u2501", 40), "\n", + "\U1F4A1 Tip: ", magenta(bold("> help(package=\"SGPmatrices\")")), "\n", + "\U1F310 Docs: ", magenta(bold("https://centerforassessment.github.io/SGPmatrices")), "\n", + strrep("\u2501", 40), "\n", + "\u2728 Happy SGPing!") # Display the startup message packageStartupMessage(message_text) } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 81e1293..cb3308c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ SGPmatrices [![R-CMD-check](https://github.com/CenterForAssessment/SGPmatrices/workflows/R-CMD-check/badge.svg)](https://github.com/CenterForAssessment/SGPmatrices/actions) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/centerforassessment/SGPmatrices?branch=master&svg=true)](https://ci.appveyor.com/project/centerforassessment/SGPmatrices) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/SGPmatrices)](http://cran.r-project.org/package=SGPmatrices) -[![Development Version](https://img.shields.io/badge/devel-0.0--0.9999-brightgreen.svg)](https://github.com/CenterForAssessment/SGPmatrices) +[![Development Version](https://img.shields.io/badge/devel-0.1--2.0-brightgreen.svg)](https://github.com/CenterForAssessment/SGPmatrices) [![License](http://img.shields.io/badge/license-GPL%203-brightgreen.svg?style=flat)](https://github.com/CenterForAssessment/SGPmatrices/blob/master/LICENSE.md) # Overview diff --git a/data/SGPmatrices.rda b/data/SGPmatrices.rda index c5a8d43..bc485aa 100644 Binary files a/data/SGPmatrices.rda and b/data/SGPmatrices.rda differ diff --git a/inst/CITATION b/inst/CITATION index defd02a..35830a1 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -3,12 +3,12 @@ citHeader("To cite package 'SGPmatrices' in publications use:") citEntry(entry = "Manual", title = "{SGPmatrices}: Baseline coefficient matrices for SGP analyses.", author = "Damian W. Betebenner and Adam R. Van Iwaarden", - year = "2024", - note = "R package version 0.1-1.0", + year = "2025", + note = "R package version 0.1-2.0", url = "https://github.com/CenterForAssessment/SGPmatrices/", - textVersion = paste("Damian W. Betebenner and Adam R. Van Iwaarden (2024).", + textVersion = paste("Damian W. Betebenner and Adam R. Van Iwaarden (2025).", "SGPmatrices: Baseline coefficient matrices for SGP analyses.", - "(R package version 0.1-1.0", + "(R package version 0.1-2.0", "URL https://github.com/CenterForAssessment/SGPmatrices/") ) diff --git a/man/SGPmatrices-package.Rd b/man/SGPmatrices-package.Rd index 36b6c7a..c08a46d 100644 --- a/man/SGPmatrices-package.Rd +++ b/man/SGPmatrices-package.Rd @@ -10,8 +10,8 @@ \tabular{ll}{ Package: \tab SGPmatrices\cr Type: \tab Package\cr -Version: \tab 0.1-1.0\cr -Date: \tab 2024-12-3\cr +Version: \tab 0.1-2.0\cr +Date: \tab 2025-4-21\cr License: \tab GPL-3\cr LazyLoad: \tab Yes\cr LazyData: \tab Yes\cr diff --git a/man/SGPmatrices.Rd b/man/SGPmatrices.Rd index 5fb253b..790a77c 100644 --- a/man/SGPmatrices.Rd +++ b/man/SGPmatrices.Rd @@ -18,6 +18,7 @@ Matrices are used if baseline SGP analyses are performed. The environment curren \item{\code{RI_Baseline_Matrices}}{Contains 2021 baseline matrices for Massachusetts RICAS/PARCC} \item{\code{UT_Baseline_Matrices}}{Contains 2021 baseline matrices for Utah RISE and Utah Aspire Plus} \item{\code{WA_Baseline_Matrices}}{Contains 2021 baseline matrices for Washington Smarter-Balanced Assessment} + \item{\code{WA_G10_Baseline_Matrices}}{Contains 2021 baseline matrices for Washington Smarter-Balanced Assessment including ID G10 Matrices} \item{\code{WIDA_Baseline_Matrices}}{Contains 2021 baseline matrices for multiple WIDA members} \item{\code{WIDA_CO_Baseline_Matrices}}{Contains 2021 baseline matrices for Colorado WIDA-ACCESS} \item{\code{WIDA_HI_Baseline_Matrices}}{Contains 2021 baseline matrices for Hawaii WIDA-ACCESS}