## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----load_img-----------------------------------------------------------------
# mislabeled_cbm_img <- function() {
#   # magick::image_read(system.file("img/mislabeled-bodymaps.png", "CHOIRBM"))
#   filename <- "img/mislabeled-bodymaps.png"
#   system.file(filename, package = "CHOIRBM", lib.loc = .libPaths()[1])
# }
# knitr::include_graphics("inst/img/mislabeled-bodymaps.png")

## ----setup--------------------------------------------------------------------
library(CHOIRBM)

## ----example------------------------------------------------------------------
## basic example code
# generate example data <- don't do this if you have data already, load it 
# into R with read.csv, read.delim, etc.
GENDER = as.character(c("Male", "Female", "Female"))
BODYMAP_CSV = as.character(c("112,125","112,113","128,117"))
cbind(GENDER, BODYMAP_CSV)

# convert the female bodymaps to a standard
BODYMAP_CSV[GENDER == "Female"] <- convert_bodymaps(
  BODYMAP_CSV[GENDER == "Female"]
  )
sampledata <- data.frame(GENDER, BODYMAP_CSV)
sampledata

## ----example2, eval=FALSE-----------------------------------------------------
# write.csv(sampledata, "filepath/filename.csv")

