Skip to content

Commit

Permalink
Merge pull request #18 from CSAFE-ISU/17-cran-release
Browse files Browse the repository at this point in the history
17 cran release
  • Loading branch information
stephaniereinders authored Jul 31, 2024
2 parents 6373aad + c44f8f4 commit b7aef0f
Show file tree
Hide file tree
Showing 27 changed files with 478 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

^scratch.R$
^cran-comments\.md$
^README\.Rmd$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: handwriterApp
Title: Handwriting Analysis in R
Version: 0.0.0.9000
Title: Shiny App for Handwriting Analysis in R
Version: 1.0.0
Authors@R:
c(person("Iowa State University of Science and Technology on behalf of its Center for Statistics and Applications in Forensic Evidence", role = c("aut", "cph", "fnd")),
person("Stephanie", "Reinders", role = c("aut", "cre"), email = "[email protected]"))
Description: Perform statistical writership analysis of scanned handwritten documents in a Shiny App.
Description: Perform statistical writership analysis of scanned handwritten documents with a Shiny App for the `handwriter` R package.
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Depends:
R (>= 2.10)
LazyData: true
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(handwriterApp)
importFrom(magrittr,"%>%")
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# handwriterApp (development version)
# handwriterApp 1.0.0

* Initial CRAN submission.
36 changes: 36 additions & 0 deletions R/app.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.


#' Handwriter Application
#'
#' Lauch a Shiny App for the `handwriter` R package.
#'
#' @param ... Other arguments passed on to `onStart`, `options`,
#' `uiPattern`, or `enableBookmarking` of `shiny::shinyApp`
#'
#' @return NULL
#'
#' @export
#'
#' @examples
#' ## Only run this example in interactive R sessions
#' if (interactive()) {
#' options(device.ask.default = FALSE)
#' handwriterApp()
#' }
#'
handwriterApp <- function(...){
# increase maximum allowed file size
options(shiny.maxRequestSize = 30*1024^2)
Expand Down
17 changes: 17 additions & 0 deletions R/case_known.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

caseKnownSidebarUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/case_maindir.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

caseMaindirUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/case_qd.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

caseQDSidebarUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/case_report.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

caseReportSidebarUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
19 changes: 18 additions & 1 deletion R/current_image.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

currentImageUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down Expand Up @@ -34,7 +51,7 @@ currentImageServer <- function(id, global, type) {
shiny::tagList(
shiny::h3("Supporting Materials"),
shiny::selectInput(ns("current_select"),
label = switch(type, "model" = "Chose a Known Writing Sample", "questioned" = "Choose a Questioned Document"),
label = switch(type, "model" = "Choose a Known Writing Sample", "questioned" = "Choose a Questioned Document"),
choices = local$current_names),
)
})
Expand Down
28 changes: 25 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

#' Small Cluster Template with 8 Clusters
#'
#' A small cluster template created by the handwriter R package with K=8
Expand Down Expand Up @@ -79,9 +96,14 @@
#' \item{wcss}{A vector of the
#' within-cluster sum of squares on each iteration of the K-means algorithm.}}
#' @examples
#' # view cluster fill counts for the template training documents
#' template_data <- handwriter::format_template_data(templateK8)
#' handwriter::plot_cluster_fill_counts(template_data, facet = TRUE)
#' # view number of clusters
#' templateK40$K
#'
#' # view number of iterations
#' templateK40$iters
#'
#' # view cluster centers
#' templateK40$centers
#'
#' @md
"templateK40"
17 changes: 17 additions & 0 deletions R/demo_known.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

demoKnownSidebarUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/demo_preview.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

demoPreviewBodyUI <- function(id){
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/demo_qd.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

demoQDSidebarUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
17 changes: 17 additions & 0 deletions R/globals.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

# templateK8 and templateK40 is are variables loaded from the data folder so we
# can't fix the note "no visible binding for global variable" by adding
# template <- NULL at the beginning of the function that uses template. Instead,
Expand Down
17 changes: 17 additions & 0 deletions R/inner.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The handwriterApp R package performs writership analysis of handwritten
# documents. Copyright (C) 2024 Iowa State University of Science and Technology
# on behalf of its Center for Statistics and Applications in Forensic Evidence
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

innerUI <- function(id) {
ns <- shiny::NS(id)
shiny::tagList(
Expand Down
Loading

0 comments on commit b7aef0f

Please sign in to comment.