Summarize number of sightings and animals for selected species by segment
Usage
airdas_effort_sight(x.list, sp.codes, sp.events = c("S", "t"))
Arguments
- x.list
list; output of
airdas_effort
- sp.codes
character; species code(s) to include in segdata. These code(s) will be converted to lower case to match
airdas_sight
- sp.events
character; event code(s) to include in the sightinfo output. This argument supersedes the 'included' value when determining whether a sighting is included in the segment summaries. Must be one or more of: "S", "t" (case-sensitive). The default is that all of these event codes are kept
Value
A list, identical to x.list
except for
1) the nSI and ANI columns added to x.list$segdata
,
one each for each element of sp.codes
, and
2) the included column of x.list$sightinfo
, which has been set as
FALSE
for sightings of species not listed in sp.codes
Details
This function takes the output of airdas_effort
and
adds columns for the number of sightings (nSI) and number of animals (ANI)
for selected species (selected via sp.codes
) for each segment
to the segdata element of x.list
.
However, only sightings with an included value of TRUE
(included is a column in sightinfo) are included in the summaries.
Having this step separate from airdas_effort
allows users to
personalize the included values as desired for their analysis.
Examples
y <- system.file("airdas_sample.das", package = "swfscAirDAS")
y.proc <- airdas_process(y)
y.cond <- airdas_effort(
y.proc, method = "condition", conditions = "Bft", seg.min.km = 0.05,
num.cores = 1
)
airdas_effort_sight(y.cond, sp.codes = c("mn", "bm"))
#> $segdata
#> segnum section_id section_sub_id event transect file stlin
#> 1 1 1 1 T T1 airdas_sample.das 3
#> 2 2 1 2 T T1 airdas_sample.das 36
#> 3 3 2 1 R T1 airdas_sample.das 40
#> 4 4 2 2 R T1 airdas_sample.das 44
#> 5 5 3 1 T T2 airdas_sample.das 53
#> 6 6 3 2 T T2 airdas_sample.das 78
#> endlin lat1 lon1 DateTime1 lat2 lon2
#> 1 36 39.23550 -123.1563 2015-04-09 12:30:59 39.23400 -123.4033
#> 2 37 39.23400 -123.4033 2015-04-09 12:37:57 39.23400 -123.4047
#> 3 44 39.23400 -123.4742 2015-04-09 12:40:00 39.23317 -123.5143
#> 4 49 39.23317 -123.5143 2015-04-09 12:41:08 39.23283 -123.6032
#> 5 78 39.22000 -123.6078 2015-04-09 12:46:51 39.21683 -123.3605
#> 6 88 39.21683 -123.3605 2015-04-09 12:54:04 39.21700 -123.2418
#> DateTime2 mlat mlon mDateTime dist year month
#> 1 2015-04-09 12:37:57 39.23309 -123.2797 2015-04-09 12:34:28 21.2882 2015 4
#> 2 2015-04-09 12:38:00 39.23400 -123.4040 2015-04-09 12:37:58 0.1148 2015 4
#> 3 2015-04-09 12:41:08 39.23323 -123.4942 2015-04-09 12:40:34 3.4595 2015 4
#> 4 2015-04-09 12:43:43 39.23245 -123.5588 2015-04-09 12:42:25 7.6620 2015 4
#> 5 2015-04-09 12:54:04 39.21667 -123.4842 2015-04-09 12:50:27 21.3146 2015 4
#> 6 2015-04-09 12:57:30 39.21700 -123.3011 2015-04-09 12:55:47 10.2336 2015 4
#> day mtime maxdistBft nSI_bm ANI_bm nSI_mn ANI_mn
#> 1 9 12:34:28 1 2 9 5 23
#> 2 9 12:37:58 2 0 0 0 0
#> 3 9 12:40:34 2 0 0 0 0
#> 4 9 12:42:25 1 0 0 1 3
#> 5 9 12:50:27 1 2 7 1 6
#> 6 9 12:55:47 2 0 0 2 12
#>
#> $sightinfo
#> segnum mlat mlon Event DateTime Lat Lon
#> 1 1 39.23309 -123.2797 S 2015-04-09 12:31:35 39.23367 -123.1783
#> 2 1 39.23309 -123.2797 S 2015-04-09 12:31:47 39.23350 -123.1857
#> 3 1 39.23309 -123.2797 S 2015-04-09 12:31:56 39.23333 -123.1917
#> 4 1 39.23309 -123.2797 S 2015-04-09 12:32:20 39.23233 -123.2053
#> 5 1 39.23309 -123.2797 S 2015-04-09 12:32:30 39.23233 -123.2108
#> 6 1 39.23309 -123.2797 S 2015-04-09 12:32:42 39.23233 -123.2195
#> 7 1 39.23309 -123.2797 S 2015-04-09 12:32:42 39.23233 -123.2195
#> 8 1 39.23309 -123.2797 S 2015-04-09 12:33:43 39.23333 -123.2550
#> 9 1 39.23309 -123.2797 S 2015-04-09 12:35:13 39.23317 -123.3073
#> 10 1 39.23309 -123.2797 S 2015-04-09 12:36:13 39.23333 -123.3418
#> 11 1 39.23309 -123.2797 S 2015-04-09 12:36:26 39.23350 -123.3500
#> 12 1 39.23309 -123.2797 t 2015-04-09 12:36:26 39.23350 -123.3500
#> 13 1 39.23309 -123.2797 S 2015-04-09 12:36:43 39.23350 -123.3592
#> 14 1 39.23309 -123.2797 S 2015-04-09 12:37:01 39.23400 -123.3697
#> 15 1 39.23309 -123.2797 S 2015-04-09 12:37:16 39.23433 -123.3790
#> 16 1 39.23309 -123.2797 S 2015-04-09 12:37:37 39.23417 -123.3910
#> 17 4 39.23245 -123.5588 S 2015-04-09 12:42:13 39.23250 -123.5515
#> 18 5 39.21667 -123.4842 S 2015-04-09 12:51:40 39.21750 -123.4410
#> 19 5 39.21667 -123.4842 S 2015-04-09 12:51:55 39.21750 -123.4317
#> 20 5 39.21667 -123.4842 S 2015-04-09 12:52:03 39.21733 -123.4270
#> 21 5 39.21667 -123.4842 S 2015-04-09 12:52:04 39.21733 -123.4270
#> 22 5 39.21667 -123.4842 S 2015-04-09 12:52:07 39.21733 -123.4258
#> 23 5 39.21667 -123.4842 S 2015-04-09 12:52:17 39.21700 -123.4185
#> 24 5 39.21667 -123.4842 S 2015-04-09 12:52:54 39.21700 -123.3982
#> 25 6 39.21700 -123.3011 S 2015-04-09 12:54:34 39.21667 -123.3422
#> 26 6 39.21700 -123.3011 S 2015-04-09 12:55:20 39.21700 -123.3172
#> 27 6 39.21700 -123.3011 S 2015-04-09 12:56:49 39.21717 -123.2685
#> OnEffort Trans Bft CCover Jelly HorizSun VertSun HKR Haze Kelp RedTide
#> 1 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 2 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 3 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 4 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 5 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 6 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 7 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 8 TRUE T1 1 10 0 6 NA n FALSE FALSE FALSE
#> 9 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 10 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 11 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 12 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 13 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 14 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 15 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 16 TRUE T1 1 10 2 6 NA r FALSE FALSE TRUE
#> 17 TRUE T1 1 20 0 6 NA n FALSE FALSE FALSE
#> 18 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 19 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 20 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 21 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 22 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 23 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 24 TRUE T2 1 20 0 12 NA n FALSE FALSE FALSE
#> 25 TRUE T2 2 20 0 12 NA n FALSE FALSE FALSE
#> 26 TRUE T2 2 20 0 12 NA n FALSE FALSE FALSE
#> 27 TRUE T2 2 20 0 12 NA r FALSE FALSE TRUE
#> AltFt SpKnot ObsL ObsB ObsR Rec VLI VLO VB VRI VRO EffortDot EventNum
#> 1 650 100 aa bb cc dd g g g g g TRUE 9
#> 2 650 100 aa bb cc dd g g g g g TRUE 10
#> 3 650 100 aa bb cc dd g g g g g TRUE 12
#> 4 650 100 aa bb cc dd g g g g g TRUE 14
#> 5 650 100 aa bb cc dd g g g g g TRUE 15
#> 6 650 100 aa bb cc dd g g g g g TRUE 16
#> 7 650 100 aa bb cc dd g g g g g TRUE 16
#> 8 650 100 aa bb cc dd g g g g g TRUE 18
#> 9 650 100 aa bb cc dd g g g g g TRUE 23
#> 10 650 100 aa bb cc dd g g g g g TRUE 26
#> 11 650 100 aa bb cc dd g g g g g TRUE 27
#> 12 650 100 aa bb cc dd g g g g g TRUE 28
#> 13 650 100 aa bb cc dd g g g g g TRUE 29
#> 14 650 100 aa bb cc dd g g g g g TRUE 31
#> 15 650 100 aa bb cc dd g g g g g TRUE 32
#> 16 650 100 aa bb cc dd g g g g g TRUE 34
#> 17 650 100 aa bb cc dd g g g g g TRUE 46
#> 18 680 90 aa dd cc bb g g g g g TRUE 65
#> 19 680 90 aa dd cc bb g g g g g TRUE 66
#> 20 680 90 aa dd cc bb g g g g g TRUE 68
#> 21 680 90 aa dd cc bb g g g g g TRUE 69
#> 22 680 90 aa dd cc bb g g g g g TRUE 70
#> 23 680 90 aa dd cc bb g g g g g TRUE 71
#> 24 680 90 aa dd cc bb g g g g g TRUE 73
#> 25 680 90 aa dd cc bb g g p g g TRUE 78
#> 26 680 90 aa dd cc bb g g p g g TRUE 80
#> 27 680 90 aa dd cc bb g g p g g TRUE 84
#> file_das line_num file_type SightNo Obs Angle ObsStd SightStd Mixed
#> 1 airdas_sample.das 9 turtle 1 cc 67 TRUE TRUE FALSE
#> 2 airdas_sample.das 10 turtle 2 bb -60 TRUE TRUE FALSE
#> 3 airdas_sample.das 12 turtle 3 cc 38 TRUE TRUE FALSE
#> 4 airdas_sample.das 14 turtle 4 aa -50 TRUE TRUE FALSE
#> 5 airdas_sample.das 15 turtle 5 cc 49 TRUE TRUE FALSE
#> 6 airdas_sample.das 16 turtle 6 cc 42 TRUE TRUE TRUE
#> 7 airdas_sample.das 16 turtle 6 cc 42 TRUE TRUE TRUE
#> 8 airdas_sample.das 19 turtle 7 aa -53 TRUE TRUE FALSE
#> 9 airdas_sample.das 24 turtle 8 dd 24 FALSE FALSE FALSE
#> 10 airdas_sample.das 27 turtle 9 aa -57 TRUE TRUE FALSE
#> 11 airdas_sample.das 28 turtle 10 cc 65 TRUE TRUE FALSE
#> 12 airdas_sample.das 29 turtle <NA> aa -20 TRUE TRUE FALSE
#> 13 airdas_sample.das 30 turtle 11 bb 87 TRUE TRUE FALSE
#> 14 airdas_sample.das 32 turtle 12 bb 82 TRUE TRUE FALSE
#> 15 airdas_sample.das 33 turtle 13 bb 54 TRUE TRUE FALSE
#> 16 airdas_sample.das 35 turtle 14 cc 62 TRUE TRUE FALSE
#> 17 airdas_sample.das 47 turtle 15 bb 50 TRUE TRUE FALSE
#> 18 airdas_sample.das 66 turtle 16 aa -31 TRUE TRUE FALSE
#> 19 airdas_sample.das 67 turtle 17 bb -59 FALSE FALSE FALSE
#> 20 airdas_sample.das 69 turtle 18 aa -62 TRUE TRUE FALSE
#> 21 airdas_sample.das 70 turtle 19 cc 42 TRUE TRUE FALSE
#> 22 airdas_sample.das 71 turtle 20 aa -48 TRUE TRUE FALSE
#> 23 airdas_sample.das 72 turtle 21 cc 63 TRUE TRUE FALSE
#> 24 airdas_sample.das 74 turtle 22 cc 43 TRUE TRUE FALSE
#> 25 airdas_sample.das 79 turtle 23 cc 56 TRUE TRUE FALSE
#> 26 airdas_sample.das 81 turtle 24 cc 37 TRUE TRUE FALSE
#> 27 airdas_sample.das 85 turtle 25 bb -76 FALSE FALSE FALSE
#> SpCode GsTotal GsSp TurtleSize TurtleDirection TurtleTail included
#> 1 mn 6 6 NA NA <NA> TRUE
#> 2 mn 6 6 NA NA <NA> TRUE
#> 3 mn 2 2 NA NA <NA> TRUE
#> 4 mn 5 5 NA NA <NA> TRUE
#> 5 bm 4 4 NA NA <NA> TRUE
#> 6 gg 10 8 NA NA <NA> FALSE
#> 7 er 10 2 NA NA <NA> FALSE
#> 8 bm 5 5 NA NA <NA> TRUE
#> 9 bm 2 2 NA NA <NA> FALSE
#> 10 mn 4 4 NA NA <NA> TRUE
#> 11 gg 5 5 NA NA <NA> FALSE
#> 12 dc 1 1 5 90 n FALSE
#> 13 pp 3 3 NA NA <NA> FALSE
#> 14 gg 5 5 NA NA <NA> FALSE
#> 15 pp 6 6 NA NA <NA> FALSE
#> 16 gg 2 2 NA NA <NA> FALSE
#> 17 mn 3 3 NA NA <NA> TRUE
#> 18 mn 6 6 NA NA <NA> TRUE
#> 19 bm 6 6 NA NA <NA> FALSE
#> 20 gg 2 2 NA NA <NA> FALSE
#> 21 bm 3 3 NA NA <NA> TRUE
#> 22 bm 4 4 NA NA <NA> TRUE
#> 23 pp 6 6 NA NA <NA> FALSE
#> 24 pp 2 2 NA NA <NA> FALSE
#> 25 mn 6 6 NA NA <NA> TRUE
#> 26 mn 6 6 NA NA <NA> TRUE
#> 27 pp 1 1 NA NA <NA> FALSE
#>
#> $randpicks
#> NULL
#>