cutoffvalue

This R package can be used to determine an objective cutoff value between a significantly bimodal distribution of log-transformed data and plot a representative graph of the results.

https://github.com/lea-medeiros/cutoffvalue

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

This R package can be used to determine an objective cutoff value between a significantly bimodal distribution of log-transformed data and plot a representative graph of the results.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.Rmd

---
title: "Cutoff Value Determination & Graph"
author: "Lea R Medeiros"
date: "2025-06-25"
output:
  html_document:
    keep_md: true
---



```{r setup-chunk, include = FALSE}
knitr::opts_chunk$set(
 collapse = TRUE,
 fig.align = 'center', fig.height = 8, fig.width = 10,
 fig.path='man/cutoffvalue_figures/README-',
 dpi = 300,
 dev = c('jpeg', 'pdf', 'png'),
 echo = TRUE
 )
```

# cutoffvalue

cutoffvalue is a simple R package that implements an updated version of the method first developed and used in Medeiros et al. (2018)[^1]. It can be used to determine an objective cutoff value between a significantly bimodal distribution of log-transformed data and plot a representative graph of the results.

The overall goals of this package are to (1) determine a cutoff value between the upper and lower modes of the dataset and (2) produce a nice graph of the results that includes a histogram of the data, the two models fit to the upper and lower modes, and a line depicting the cutoff value. The functions are written to be run independently, so that only two functions need to be run to get the necessary information:

- modes() <- Determines modality of the dataset, which is an assumption for the remaining functions
- cutoffplot() <- Determines the cutoff value and produces a nice graph of the results

The functions in this package are written to utilize the example data set (an internal dataset object identified as "exampledata") and will use it by default if a dataset is not provided. Below are the instructions on how to install the cutoffvalue package, setup the R Studio environment, and suggestions on how to import and convert your dataset into the proper format. Please see the vignette for more information about each function.

## Installation

You can install the development version of cutoffvalue from [GitHub](https://github.com/lea-medeiros/cutoffvalue.git) with:

```{r install-package}
# devtools::install_github("lea-medeiros/cutoffvalue", dependencies = TRUE, build_vignettes = TRUE)
```


## Setup RStudio

Load the packages that you will need.

```{r load-packages, message=FALSE}
library(cutoffvalue)
library(readxl) # Only necessary if you will be importing an excel file (see below)
```


## Import your dataset

Import the data file to be used in the analyses and graph. The package includes a dataset for use as an example - this object is accessible as "cutoffvalue:::exampledata" and will be used in the examples.

Import your own dataset any way you prefer. I find that the easiest way to import data is to use the "Import Dataset" function built into R Studio, but you can also use code (an example is provided below). The imported data must then be converted into a list of numeric values.

```{r import-data}
# yourrawdata <- read_excel("/path/to/your/excel/data", col_names = TRUE) # Imports the data as a dataframe with first row as column names
# yourrawdata <- as.numeric(yourrawdata$columnname) # converts the specified column to a numeric list of values
```

Each function in this package uses the provided dataset (whether it's the example dataset or one you provided) and cleans it up (via the `cleandata` function, see the vignette for more information) to remove any blank cells. This function then provides a list of objects: the data (`mydata$data`), the maximum value (`mydata$upper`), and the minimum value (`mydata$lower`), all of which are then used in subsequent calculations.

[^1]: Medeiros LR, Galbreath PF, Knudsen CM, Stockton CA, Koch IJ, Bosch WJ, Narum SR, Nagler JJ, Pierce AL (2018) Plasma 11-Ketotestosterone in   Individual Age-1 Spring Chinook Salmon Males Accurately Predicts Age-2 Maturation Status. Transactions of the American Fisheries Society 147   (6):1042-1051. https://doi.org/10.1002/tafs.10097

Owner

  • Login: lea-medeiros
  • Kind: user

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: cutoffvalue
message: When using this package, please cite it as below.
type: software
authors:
  - given-names: Lea R
    family-names: Medeiros
    email: lmedeiros@uidaho.edu
    affiliation: University of Idaho
    orcid: 'https://orcid.org/0000-0001-6944-4935'
repository-code: 'https://github.com/lea-medeiros/cutoffvalue'
abstract: >-
  This is a simple R package that implements an updated
  version of the method first developed and used in Medeiros
  et al. (2018). It can be used to determine an objective
  cutoff value between a significantly bimodal distribution
  of log-transformed data and plot a representative graph of
  the results.
license: MIT
version: '2.1.0'
date-released: '2025-03-20'

GitHub Events

Total
  • Public event: 1
  • Push event: 231
  • Create event: 4
Last Year
  • Public event: 1
  • Push event: 231
  • Create event: 4