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

trying altdoc #177

Merged
merged 1 commit into from
Aug 7, 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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^README\.Rmd$
^tools$
^scratch.R$
^altdoc$
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ revdep/
inst/doc

scratch*
*.psd
*.psd
altdoc/freeze.rds
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


<!-- README.md is generated from README.Rmd. Please edit that file -->

# handwriter
Expand Down Expand Up @@ -56,7 +57,7 @@ Use `processDocument()` to
library(handwriter)
phrase <- system.file("extdata", "phrase_example.png", package = "handwriter")
doc <- processDocument(phrase)
#> path in readPNGBinary: /private/var/folders/1z/jk9bqhdd06j1fxx0_xm2jj980000gn/T/RtmplsdN6z/temp_libpath947954bb6036/handwriter/extdata/phrase_example.png
#> path in readPNGBinary: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/handwriter/extdata/phrase_example.png
#> Starting Processing...
#> Getting Nodes...
#> Skeletonizing writing...
Expand All @@ -76,23 +77,23 @@ We can view the image:
plotImage(doc)
```

<img src="man/figures/README-image-1.png" width="100%" />
<img src="man/figures/README-image-1.png" style="width:100.0%" />

We can view the thinned image:

``` r
plotImageThinned(doc)
```

<img src="man/figures/README-thin-1.png" width="100%" />
<img src="man/figures/README-thin-1.png" style="width:100.0%" />

We can also view the nodes:

``` r
plotNodes(doc)
```

<img src="man/figures/README-nodes-1.png" width="100%" />
<img src="man/figures/README-nodes-1.png" style="width:100.0%" />

## Perform Writership Analysis

Expand Down Expand Up @@ -194,7 +195,8 @@ template_data <- format_template_data(template = template)
plot_cluster_fill_counts(template_data, facet = TRUE)
```

<img src="man/figures/README-unnamed-chunk-4-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-4-1.png"
style="width:100.0%" />

### STEP 3: Fit a Hierarchical Model

Expand Down Expand Up @@ -258,9 +260,11 @@ but the model data is already in the correct format.)
plot_cluster_fill_counts(formatted_data=model, facet = TRUE)
```

<img src="man/figures/README-unnamed-chunk-7-1.png" width="100%" /> The
bars across the top of each graph show the Writer ID. Each graph has a
line for each known handwriting sample from a given writer.
<img src="man/figures/README-unnamed-chunk-7-1.png"
style="width:100.0%" />

The bars across the top of each graph show the Writer ID. Each graph has
a line for each known handwriting sample from a given writer.

#### Hierarchical Model Variables and Burn-in

Expand Down Expand Up @@ -297,7 +301,8 @@ View a trace plot of a variable.
plot_trace(variable = "mu[1,1]", model = model)
```

<img src="man/figures/README-unnamed-chunk-10-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-10-1.png"
style="width:100.0%" />

If we need to, we can drop the beginning MCMC iterations for burn-in.
For example, if we want to drop the first 25 iterations, we use
Expand Down Expand Up @@ -368,7 +373,8 @@ the cluster fill counts observed in each questioned document.
plot_cluster_fill_counts(analysis, facet = TRUE)
```

<img src="man/figures/README-unnamed-chunk-15-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-15-1.png"
style="width:100.0%" />

View the posterior probabilities of writership.

Expand Down
Empty file added altdoc/.nojekyll
Empty file.
45 changes: 45 additions & 0 deletions altdoc/docsify.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- index.html -->

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '$ALTDOC_PACKAGE_NAME',
repo: '$ALTDOC_PACKAGE_URL_GITHUB',
loadSidebar: true,
subMaxLevel: 2,
search: {
placeholder: 'Search',
depth: 3,
},
auto2top: true,
copyCode: {
buttonText : 'Copy',
errorText : 'Error',
successText: 'Copied'
},
plugins: [
function(hook) {
var footer = ["<a href='$ALTDOC_PACKAGE_URL'> <code> $ALTDOC_PACKAGE_NAME </code> v. $ALTDOC_PACKAGE_VERSION </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. $ALTDOC_VERSION</a>"].join('');

hook.afterEach(function(html) {
return html + footer;
});
}
]
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1.24.1/components/prism-r.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions altdoc/docsify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* [Home](/)
* Articles: $ALTDOC_VIGNETTE_BLOCK
* Reference: $ALTDOC_MAN_BLOCK
* [News]($ALTDOC_NEWS)
* [Changelog]($ALTDOC_CHANGELOG)
* [Code of Conduct]($ALTDOC_CODE_OF_CONDUCT)
* [License]($ALTDOC_LICENSE)
* [Licence]($ALTDOC_LICENCE)
* [Citation]($ALTDOC_CITATION)
6 changes: 6 additions & 0 deletions altdoc/preamble_man_qmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
format:
md:
prefer-html: true
---

6 changes: 6 additions & 0 deletions altdoc/preamble_vignettes_qmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
format:
md:
prefer_html: true
default-image-extension: ""
---
4 changes: 4 additions & 0 deletions altdoc/preamble_vignettes_rmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
always_allow_html: yes
---

Empty file added docs/.nojekyll
Empty file.
22 changes: 22 additions & 0 deletions docs/CITATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Citation

```verbatim
To cite package ‘handwriter’ in publications use:

Iowa State University of Science and Technology on behalf of its
Center for Statistics and Applications in Forensic Evidence, Berry
N, Reinders S, Taylor J (2024). _handwriter: Handwriting Analysis in
R_. R package version 3.1.1.9000, commit
2ca3187a3e750fed34d373eae7dd587483c96b75,
<https://github.com/CSAFE-ISU/handwriter>.

A BibTeX entry for LaTeX users is

@Manual{,
title = {handwriter: Handwriting Analysis in R},
author = {{Iowa State University of Science and Technology on behalf of its Center for Statistics and Applications in Forensic Evidence} and Nick Berry and Stephanie Reinders and James Taylor},
year = {2024},
note = {R package version 3.1.1.9000, commit 2ca3187a3e750fed34d373eae7dd587483c96b75},
url = {https://github.com/CSAFE-ISU/handwriter},
}
```
Loading