diff --git a/.Rbuildignore b/.Rbuildignore index 499fa61..35091f1 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,5 @@ ^scratch.R$ ^cran-comments\.md$ +^README\.Rmd$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..0f2fe08 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -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")' diff --git a/DESCRIPTION b/DESCRIPTION index 2e84bc5..9ea47c7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "srein@iastate.edu")) -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 diff --git a/NAMESPACE b/NAMESPACE index ea39623..02eed32 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,5 @@ # Generated by roxygen2: do not edit by hand export("%>%") +export(handwriterApp) importFrom(magrittr,"%>%") diff --git a/NEWS.md b/NEWS.md index d99e1bf..533ede1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,3 @@ -# handwriterApp (development version) +# handwriterApp 1.0.0 * Initial CRAN submission. diff --git a/R/app.R b/R/app.R index 6e57176..04f17e7 100644 --- a/R/app.R +++ b/R/app.R @@ -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 . + + +#' 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) diff --git a/R/case_known.R b/R/case_known.R index 9284690..641ca61 100644 --- a/R/case_known.R +++ b/R/case_known.R @@ -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 . + caseKnownSidebarUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/case_maindir.R b/R/case_maindir.R index e21fd58..7903284 100644 --- a/R/case_maindir.R +++ b/R/case_maindir.R @@ -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 . + caseMaindirUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/case_qd.R b/R/case_qd.R index 4c96254..10742cd 100644 --- a/R/case_qd.R +++ b/R/case_qd.R @@ -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 . + caseQDSidebarUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/case_report.R b/R/case_report.R index 565d399..8590b35 100644 --- a/R/case_report.R +++ b/R/case_report.R @@ -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 . + caseReportSidebarUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/current_image.R b/R/current_image.R index 89da2e9..9d4277f 100644 --- a/R/current_image.R +++ b/R/current_image.R @@ -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 . + currentImageUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( @@ -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), ) }) diff --git a/R/data.R b/R/data.R index 622fa00..9310080 100644 --- a/R/data.R +++ b/R/data.R @@ -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 . + #' Small Cluster Template with 8 Clusters #' #' A small cluster template created by the handwriter R package with K=8 @@ -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" diff --git a/R/demo_known.R b/R/demo_known.R index 7b12f56..689a8cd 100644 --- a/R/demo_known.R +++ b/R/demo_known.R @@ -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 . + demoKnownSidebarUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/demo_preview.R b/R/demo_preview.R index dfabfee..6aef6af 100644 --- a/R/demo_preview.R +++ b/R/demo_preview.R @@ -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 . + demoPreviewBodyUI <- function(id){ ns <- shiny::NS(id) shiny::tagList( diff --git a/R/demo_qd.R b/R/demo_qd.R index 9774ace..4fce15a 100644 --- a/R/demo_qd.R +++ b/R/demo_qd.R @@ -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 . + demoQDSidebarUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/globals.R b/R/globals.R index e5af828..19ef891 100644 --- a/R/globals.R +++ b/R/globals.R @@ -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 . + # 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, diff --git a/R/inner.R b/R/inner.R index ac32e17..bc84c79 100644 --- a/R/inner.R +++ b/R/inner.R @@ -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 . + innerUI <- function(id) { ns <- shiny::NS(id) shiny::tagList( diff --git a/R/server_utils.R b/R/server_utils.R index e0a3e0b..5403c73 100644 --- a/R/server_utils.R +++ b/R/server_utils.R @@ -1,3 +1,21 @@ +# 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 . + + #' Copy Documents to Project Directory #' #' When the user selects documents the files are copied to main_dir > data > diff --git a/R/ui_utils.R b/R/ui_utils.R index 6152dca..a67b9d6 100644 --- a/R/ui_utils.R +++ b/R/ui_utils.R @@ -1,3 +1,21 @@ +# 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 . + + #' Set Indices #' #' This helper function creates a numericInput with default value 1, minimum value 1, diff --git a/R/utils-pipe.R b/R/utils-pipe.R index fd0b1d1..1040c2c 100644 --- a/R/utils-pipe.R +++ b/R/utils-pipe.R @@ -1,3 +1,21 @@ +# 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 . + + #' Pipe operator #' #' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..642b665 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,45 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# handwriterApp + + + + +Handwriter is designed to assist forensic examiners by analyzing handwritten documents against a closed set of potential writers. It determines the probability that each writer wrote the document. Whether you are a forensic document examiner, legal professional, academic, or simply curious about how statistics are applied to handwriting, handwriter provides an automated way to evaluate handwriting samples. + +## Installation + +Handwriter requires R, RStudio IDE, and JAGS. + +- Install R from [CRAN](https://cran.r-project.org/) +- Install RStudio IDE from [POSIT](https://posit.co/download/rstudio-desktop/). Click Download RStudio. +- Install JAGS from [SourceForge](https://sourceforge.net/projects/mcmc-jags/files). Click Download. + +Install the handwriterApp R package. Open RStudio and navigate to the console window and type +```{r install, eval = FALSE} +install.packages("handwriterApp") +``` + +## Lauch the App + +In the RStudio console, type +```{r example, eval = FALSE} +library(handwriterApp) +handwriterApp() +``` +In the pop-up window, click Open in Browser. If you use the app in the pop-up window instead of in a browser, some of the links will not work. + +Follow the instructions in the app to view a demo or simulate casework with real handwriting samples. diff --git a/README.md b/README.md new file mode 100644 index 0000000..dd4a8e7 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ + + + +# handwriterApp + + + + +Handwriter is designed to assist forensic examiners by analyzing +handwritten documents against a closed set of potential writers. It +determines the probability that each writer wrote the document. Whether +you are a forensic document examiner, legal professional, academic, or +simply curious about how statistics are applied to handwriting, +handwriter provides an automated way to evaluate handwriting samples. + +## Installation + +Handwriter requires R, RStudio IDE, and JAGS. + +- Install R from [CRAN](https://cran.r-project.org/) +- Install RStudio IDE from + [POSIT](https://posit.co/download/rstudio-desktop/). Click Download + RStudio. +- Install JAGS from + [SourceForge](https://sourceforge.net/projects/mcmc-jags/files). Click + Download. + +Install the handwriterApp R package. Open RStudio and navigate to the +console window and type + +``` r +install.packages("handwriterApp") +``` + +## Lauch the App + +In the RStudio console, type + +``` r +library(handwriterApp) +handwriterApp() +``` + +In the pop-up window, click Open in Browser. If you use the app in the +pop-up window instead of in a browser, some of the links will not work. + +Follow the instructions in the app to view a demo or simulate casework +with real handwriting samples. diff --git a/cran-comments.md b/cran-comments.md index 858617d..1f13a7b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,4 +2,9 @@ 0 errors | 0 warnings | 1 note -* This is a new release. +checking CRAN incoming feasibility ... [3s/12s] NOTE + Maintainer: ‘Stephanie Reinders ’ + + New submission + +* This is a new release \ No newline at end of file diff --git a/inst/extdata/HTML/case_files.html b/inst/extdata/HTML/case_files.html index d6a93ef..35aed4b 100644 --- a/inst/extdata/HTML/case_files.html +++ b/inst/extdata/HTML/case_files.html @@ -3,7 +3,7 @@

PREPARE THE FILES


-

If you downloaded handwriting samples from the CSAFE Handwriting Database, the samples are ready to go so click Next. Otherwise, keep reading.

+

If you downloaded handwriting samples from the CSAFE Handwriting Database, the samples are ready to go, so click Next. Otherwise, keep reading.

Save the Images as PNG

Save the handwriting samples as PNG images.

Rename the Files

diff --git a/man/handwriterApp.Rd b/man/handwriterApp.Rd new file mode 100644 index 0000000..edc4f5c --- /dev/null +++ b/man/handwriterApp.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/app.R +\name{handwriterApp} +\alias{handwriterApp} +\title{Handwriter Application} +\usage{ +handwriterApp(...) +} +\arguments{ +\item{...}{Other arguments passed on to \code{onStart}, \code{options}, +\code{uiPattern}, or \code{enableBookmarking} of \code{shiny::shinyApp}} +} +\description{ +Lauch a Shiny App for the \code{handwriter} R package. +} +\examples{ +## Only run this example in interactive R sessions +if (interactive()) { + options(device.ask.default = FALSE) + handwriterApp() +} + +} diff --git a/man/templateK40.Rd b/man/templateK40.Rd index 3fa6fca..921f651 100644 --- a/man/templateK40.Rd +++ b/man/templateK40.Rd @@ -46,9 +46,14 @@ called \emph{graphs}. The graphs are sorted into 40 clusters with a K-Means algorithm. See the handwriter R package for more details. } \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 } \keyword{datasets}