Data frame with one row per haul to DATRASraw alike object
get_datrasraw.Rd
Data frame with one row per haul to DATRASraw alike object
Examples
dat <- data.frame(
species = 1:2,
Year = 2016:2020,
lon = rnorm(n = 10, mean = 170, sd = 10),
lat = rnorm(n = 10, mean = 170, sd = 10),
sx = rnorm(n = 10, mean = 60, sd = 10),
sy = rnorm(n = 10, mean = 170, sd = 10),
covA = rnorm(n = 10, mean = 3, sd = 10),
covB = rnorm(n = 10, mean = 20, sd = 10),
EFFORT = rnorm(n = 10, mean = 20, sd = 10))
ds <- split(dat,dat$species)
lapply(ds, get_datrasraw)
#> $`1`
#> [[1]]
#> data frame with 0 columns and 0 rows
#>
#> [[2]]
#> species Year lon lat sx sy covA covB EFFORT
#> 1 1 2016 174.2657 156.9488 67.66440 164.4198 5.630667 29.608648 35.25939
#> 3 1 2018 170.2229 174.5434 73.21781 176.7768 -4.882588 30.359308 39.93110
#> 5 1 2020 167.3735 167.1310 65.14600 166.4362 6.636526 7.246651 45.64408
#> 7 1 2017 171.9215 170.6730 75.32741 178.0441 8.176691 42.117695 31.42695
#> 9 1 2019 178.4618 161.7269 61.22103 179.3578 -6.740696 8.534761 16.02999
#> haul.id
#> 1 1
#> 3 2
#> 5 3
#> 7 4
#> 9 5
#>
#> [[3]]
#> data frame with 0 columns and 0 rows
#>
#> attr(,"class")
#> [1] "DATRASraw"
#>
#> $`2`
#> [[1]]
#> data frame with 0 columns and 0 rows
#>
#> [[2]]
#> species Year lon lat sx sy covA covB
#> 2 2 2017 171.0758 160.5509 69.79957 180.5254 -14.9059186 27.687214
#> 4 2 2019 176.0361 161.4480 48.80289 170.3850 -8.3302167 15.261129
#> 6 2 2016 164.7174 178.9496 44.90900 177.8284 0.1411209 16.943793
#> 8 2 2018 158.5380 168.3732 64.29147 150.9994 1.9709133 9.583316
#> 10 2 2020 170.8172 188.7651 48.61988 166.9095 15.7067230 3.246727
#> EFFORT haul.id
#> 2 25.54186 1
#> 4 18.45879 2
#> 6 30.61999 3
#> 8 31.23839 4
#> 10 11.76739 5
#>
#> [[3]]
#> data frame with 0 columns and 0 rows
#>
#> attr(,"class")
#> [1] "DATRASraw"
#>