Function for finding the summed probability distribution of multiple shoreline dates.

sum_shoredates(
  shoreline_dates,
  cut_off = -2500,
  cut_off_level = 1,
  normalise = TRUE
)

Arguments

shoreline_dates

Object of class shoreline_date.

cut_off

Calendar year specifying where dates should be cut off. Defaults to 2500 BCE.

cut_off_level

Numerical value between 0 and 1 indicating the probability mass that has to fall after the cut-off for a date to be excluded. Defaults to 1, retaining all dates.

normalise

Logical value indicating whether the probability sum of the dates should be normalised to sum to unity. Defaults to TRUE.

Value

List of class shoredate_sum holding the elements:

  • sum data frame with the columns bce where negative values indicate years BCE and positive CE, as well as probability, which gives the probability mass for each year.

  • dates_n number of dates that make up the sum after applying any specified cut-off. One date per site per isobase direction.

Examples

target_points <- sf::st_sfc(sf::st_point(c(538310, 6544255)),
                            sf::st_point(c(538300, 6544250)))
target_points <- sf::st_as_sf(target_points, crs = 32632)

# Shoreline date, reducing resoltuion on elevation and calendar scales for
# speed.
target_dates <- shoreline_date(target_points,
                               elevation = c(65, 70),
                               elev_reso = 10,
                               cal_reso = 500)

sum_shoredates(target_dates)
#> $sum
#>       bce probability
#> 1  -10550 0.000000000
#> 2  -10050 0.000000000
#> 3   -9550 0.000000000
#> 4   -9050 0.000000000
#> 5   -8550 0.204938076
#> 6   -8050 0.640915936
#> 7   -7550 0.049773356
#> 8   -7050 0.035353443
#> 9   -6550 0.010428783
#> 10  -6050 0.010460665
#> 11  -5550 0.015498099
#> 12  -5050 0.010090269
#> 13  -4550 0.007648791
#> 14  -4050 0.002595957
#> 15  -3550 0.002603893
#> 16  -3050 0.002603893
#> 17  -2550 0.001389120
#> 18  -2050 0.001389120
#> 19  -1550 0.002786733
#> 20  -1050 0.000000000
#> 21   -550 0.001523868
#> 22    -50 0.000000000
#> 23    450 0.000000000
#> 24    950 0.000000000
#> 25   1450 0.000000000
#> 26   1950 0.000000000
#> 
#> $dates_n
#> [1] 2
#> 
#> attr(,"class")
#> [1] "shoredates_sum" "list"