-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from nutriverse:dev
- Loading branch information
Showing
8 changed files
with
198 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: pkgdown-pr | ||
|
||
jobs: | ||
netlify: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-tinytex@v2 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, local::. | ||
needs: website | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
|
||
- name: Create website | ||
run: | | ||
pkgdown::build_site() | ||
shell: Rscript {0} | ||
|
||
- name: Create index file | ||
run: | | ||
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./docs/index.html | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: './docs' | ||
production-branch: main | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: | ||
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})' | ||
# these default to 'true' | ||
enable-commit-comment: false | ||
enable-github-deployment: false | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Tests for summary measures function ------------------------------------------ | ||
|
||
test_that("calculate_* works as expected", { | ||
expect_type( | ||
calculate_mean( | ||
c( | ||
smartStd[smartStd$observer == 0 , "weight1"], | ||
smartStd[smartStd$observer == 0 , "weight2"] | ||
) | ||
), | ||
"double" | ||
) | ||
expect_type( | ||
calculate_sd( | ||
c( | ||
smartStd[smartStd$observer == 0 , "weight1"], | ||
smartStd[smartStd$observer == 0 , "weight2"] | ||
) | ||
), | ||
"double" | ||
) | ||
expect_type( | ||
calculate_max( | ||
c( | ||
smartStd[smartStd$observer == 0 , "weight1"], | ||
smartStd[smartStd$observer == 0 , "weight2"] | ||
) | ||
), | ||
"double" | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Tests for calculate_team_tem ------------------------------------------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.html | ||
*.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "Anthropometric measurement standardisation tests" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{Anthropometric measurement standardisation tests} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
``` | ||
|
||
```{r setup, echo = FALSE} | ||
library(anthrocheckr) | ||
``` | ||
|
||
Ensuring the precision and accuracy of measurements is critical when collecting anthropometric data. Anthropometrists are usually tested for precision and accuracy of measurement through standardisation tests performed prior to anthropometric data collection. This package provides functions to calculate inter- and intra-observer technical error of measurement (TEM) to assess precision of measurements. | ||
|
||
## What does anthrocheckr do? | ||
|
||
`{anthrocheckr}` provides functions for: | ||
|
||
1. Calculating standard summaries for intra-observer or inter-observer measurements; | ||
|
||
2. Calculating intra-observer or inter-observer technical error of measurement (TEM) for multiple subjects and for multiple measurers/observers; | ||
|
||
3. Calculating multiple measurers/observers relative technical error of measurement (relative TEM); | ||
|
||
4. Calculating intra-observer total technical error of measurement (total TEM); | ||
|
||
5. Calculating coefficient of reliability; and, | ||
|
||
6. Calculating bias in measurements/observation against a gold standard. | ||
|
||
|
||
## Installation | ||
|
||
`{anthrocheckr}` is not yet on [CRAN](https://cran.r-project.org) but can be installed from the [nutriverse R Universe](https://nutriverse.r-universe.dev) as follows: | ||
|
||
```{r install-r-universe, eval = FALSE} | ||
install.packages( | ||
"anthrocheckr", | ||
repos = c('https://nutriverse.r-universe.dev', 'https://cloud.r-project.org') | ||
) | ||
``` | ||
|
||
## Usage |