knitr::opts_chunk$set(echo = TRUE)

1. read the fish data

# I cannot load the example dataset "fish_catch.rda"
fish <- read.table("../fish.txt")
# pull out the vector
fish_test <- fish$V1

# call our function
source(here::here("R","fish_count.R"))

2. test the function

a) with a plot

fish_count(fish = fish_test, hist.plot = TRUE)

b) default, no plot

fish_count(fish = fish_test)

c) error checking

# fish_count(fish = as.list(fish_test))
# fish_count(fish = c(1:10))


quin-smith/groupcsbigpkg documentation built on March 22, 2021, 11:05 p.m.