-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
61 lines (40 loc) · 1.91 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# BayesianLaterality
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/BayesianLaterality)](https://cran.r-project.org/package=BayesianLaterality)
[![R-CMD-check](https://github.com/LCBC-UiO/BayesianLaterality/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LCBC-UiO/BayesianLaterality/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
BayesianLaterality contains a function for predicting latent hemispheric dominance based on observed laterality using a Bayes classifier developed by [Sørensen and Westerhausen (2020)](https://doi.org/10.1080/1357650X.2020.1769124). See also the [accompanying Shiny app](https://osorensen.shinyapps.io/BayesianLateralityApp/).
## Installation
You can install BayesianLaterality from [CRAN](https://cran.r-project.org/web/packages/BayesianLaterality/) with:
```{r, eval=FALSE}
install.packages("BayesianLaterality")
```
Install the latest development version from [GitHub](https://github.com/LCBC-UiO/BayesianLaterality) with:
``` r
# install.packages("remotes")
remotes::install_github("LCBC-UiO/BayesianLaterality")
```
## Application Example
```{r}
library(BayesianLaterality)
```
The main (and only) function of the package is `predict_dominance()`. To see the arguments that can be set by the user and a more extended example, type `?predict_dominance` in the R terminal. Here is a simple example. The dataset `example_data1` contains three laterality measurements on three right-handed individuals.
```{r}
example_data1
```
We then obtain predicted hemispheric dominance as follows. The ID column reflects the row in the original dataset.
```{r}
predict_dominance(example_data1)
```