chuck.zeros | R Documentation |
Removes zeros before the first non-zero catch, and the same for zeros following the last non-zero catch.
chuck.zeros(b, e, beg.buff, end.buff, df)
b |
An integer representing the number of zeros and |
e |
An integer representing the number of zeros and |
beg.buff |
An integer. The actual number of zeros and |
end.buff |
An integer. The actual number of zeros and |
df |
A data frame containing catch records for one particular trap's temporal sequence. |
Manipulation of the b
and e
variables specifies the
number of trapping days with preceding and antecedent zeros to retain.
Thus, the number of zero catch records both before the first and after the
last caught fish is independently adjustable.
Note that variable n.tot
in data frame df
identifies zero and
NA
catch records.
A data frame, necessarily a subset of the data frame df
provided to the function, with all zero and NA
catch records removed
before the first, and after the last, valid catch record.
WEST Inc.
max.buff.days
## Not run: # ---- Remove all zero and NA records before the first non-zero and non-NA # ---- catch record in record 4 in data frame catch.df. Do the same for # ---- the last, which is in record 12. df <- chuck.zeros(0,0,4,12,catch.df) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.