initialize_population: Initialize Population

Description Usage Arguments Examples

View source: R/initialize_population.R

Description

This function initializes the spatial distribution of the fish population

Usage

1
2
initialize_population(numrow, numcol, nfish = 100, seed = 300, distribute,
  maxfish = 10, area = "upperleft", percent = 0.1, ...)

Arguments

numrow

Number of rows in matrix

numcol

Number of columns in matrix

nfish

Number of fish to allocate among matrix

seed

Set seed if distribute == random, defaults to 300

distribute

Specify fish distribution to be 'uniform', 'patchy', or 'area' specific

maxfish

Maximum number of fish that can be sampled at a time

area

Specify area to distribute fish, options are 'upperleft', 'upperright', 'lowerleft', 'lowerright',#' 'upperhalf', 'lowerhalf', 'righthalf', 'lefthalf' Only necessary if distribute == 'area'

percent

percentage of area to sample. Only necessary if distribute == 'patchy'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
Uniformly distribute fish
initialize_population(numrow = 10, numcol = 10, nfish = 1000, distribute = 'uniform')

Distribute fish in upper right quadrant only
initialize_population(numrow = 10, numcol = 10, nfish = 1000, distribute = 'area',
                            area = 'upperright')

Distribute fish in upper half
initialize_population(numrow = 10, numcol = 10, nfish = 1000, distribute = 'area',
                            area = 'upperhalf')

Patchily distribute fish
initialize_population(numrow = 10, numcol = 10, nfish = 100, distribute = 'patchy',
  percent = .2)

peterkuriyama/hlsimulator_old documentation built on May 25, 2019, 1:51 a.m.