library(usethis)

Study Area

Data for the tests were taken from the Lower Pool 10 HREP. \\mvrdfs\egis\Work\EMP\HREP_Projects\Lower_Pool10\MusselModel\Data

Test mussel data

mcat/data-raw/lp10_all_individuals.csv

Convert the individuals.csv file into a data frame

individuals <- read.csv("../data-raw/lp10_all_individuals.csv", 
                        stringsAsFactors = FALSE)

fields_to_keep <- c("SampleID", "Ename", "ID_Number", "Peviously_Marked", 
                    "Marked_mussel", "Status", "Sex", "Gravidity", "Age",  
                    "Length", "Height", "VoucherLocation", "VoucherType", 
                    "ZebrasAttached", "Comments", "Northing", "Easting", 
                    "Method", "NumZebrasAttached1", "PerZebraCoverage1")

# Remove unneeded fields
individuals <- individuals[, fields_to_keep]

# Rename fields
names(individuals)[names(individuals) == "NumZebrasAttached1"] <- "NumZebrasAttached"
names(individuals)[names(individuals) == "PerZebraCoverage1"] <- "PerZebraCoverage"

Make this data available to the package.

usethis::use_data(individuals, overwrite = TRUE)

Create MCAT lookup tables

Use the tables in the MCAT report [@dunn2016] to populate the following tables:

Create a .csv file for each table and store in the /data-raw folder.

Import the required MCAT tables

listed <- read.csv("../data-raw/listed.csv", 
                   stringsAsFactors = FALSE)
tolerant <- read.csv("../data-raw/tolerant.csv", 
                     stringsAsFactors = FALSE)
lampsilini <- read.csv("../data-raw/lampsilini.csv", 
                     stringsAsFactors = FALSE)
tribe <- read.csv("../data-raw/tribe.csv", 
                     stringsAsFactors = FALSE)

Make this data available to the package.

usethis::use_data(listed, overwrite = TRUE)
usethis::use_data(tolerant, overwrite = TRUE)
usethis::use_data(lampsilini, overwrite = TRUE)
usethis::use_data(tribe, overwrite = TRUE)


mpdougherty/mcat documentation built on June 5, 2019, 8:52 p.m.