recruit: Recruit Units from a Population for Sampling

Description Usage Arguments Details Value

View source: R/recruit.R

Description

This function works with the output of 'stratify()'. The user provides the number of units they wish to sample from their population dataset. The function tells the user how many to sample from each stratum and generates recruitment lists, one per stratum, which can either be saved to .csv files in any given directory or accessed later on.

Usage

1
recruit(x, guided = TRUE, number = NULL, save_as_csv = FALSE)

Arguments

x

output from 'stratify()', of S3 class 'generalizer_output'

guided

logical; defaults to TRUE. Whether the function should be guided (ask questions and behave interactively throughout) or not. If set to FALSE, must provide values for other arguments below

number

defaults to NULL. If guided is set to FALSE, must provide a number of units to sample

save_as_csv

defaults to NULL. If guided is set to FALSE, specify whether or not to save recruitment lists to working directory; TRUE or FALSE

Details

This function, and the others in this package, are designed to mimic the website https://www.thegeneralizer.org/.

Value

A one-element list containing the table that includes the number of units to sample per stratum


katiecoburn/generalizeR documentation built on Oct. 28, 2020, 4:43 a.m.