Part_Wrap: Wrapper function to create all variables necessary to create...

Description Usage Arguments Value

View source: R/Part_Wrap.R

Description

Wrapper function to create all variables necessary to create ungulate parturition prediction models.

Usage

1
2
3
4
Part_Wrap(dat, projstring, dataset, saveby = "Study", time.zone, ncpus,
  folder, mean_date, bday_dat, idname = "UAID", sampsize = 80,
  prepBoots = 75, finBoots, imp = FALSE, part_type = "date",
  targ_time = 25, targ_dist = 300)

Arguments

dat

cleaned movement data as data.frame

projstring

proj4string of dat projection

dataset

character vector shortname of dataset (eg. 'SMElk')

saveby

Either 'Animal' or 'Study'. Most should use 'Study'

time.zone

posix compliant time.zone character vector ('Etc/GMT-8')

ncpus

number of cpus to use for parallel processing (minimum 2)

folder

directory to store data in. If not created, function will create

mean_date

julian date (as.numeric) of the mean date of parturition for your animal/system.

bday_dat

data.frame with UAID and Date.of.Birth columns only

idname

Column name (character vector) for Unique animal ID column (default = 'UAID')

sampsize

Percent of animals to use to train model (default percent = 80)

prepBoots

bootstraps to use when preparing variables/model (~20 is sufficient)

finBoots

bootstraps to use when creating final model (200-1000)

part_type

character vector: 'date' assings all rows with the parturition date as the response, 'dist' searches targ_time either side of the date and assigns rows as response if distance of that fix is < targ_dist

targ_time

number defining how far to look either side of date when assigning parturition in hours (default is 25 or 1 day)

targ_dist

number determining how far away from birth location to assign as parturition (default is 300 meters)

Value

List of length 2. 1) aggregates the model training - prediction results, 2) aggregates the predicted results to make a final prediction. Also saves all steps in /Results folder within the folder given to function


MovingUngulate/Part documentation built on May 30, 2019, 6:12 a.m.