add_screen_diam: Calculates screen diameter for a model based on alpha and a...

Description Usage Arguments Value

View source: R/internal_fns.R

Description

Calculates screen diameter for a model based on alpha and a viewing distance

Usage

1
add_screen_diam(x, alpha = NULL, screen_distance)

Arguments

x

numeric. Output of attack_model or attack_model_whale function, or other object containing alpha angles data.

screen_distance

numeric. distance from screen in same units as those used in model

alpha_col

numeric. The column of alpha values. Automatically detected in most models, but can be specified here.

Value

Original object or data frame with 'screen_diam' column added, in same units as used in model and screen_distance. Rounded to 2 decimals places. Because of values approaching infinty at very close distances, any value over 1000 is replaced with 1000, so use appropriate units (cm is best).


nicholascarey/attackR documentation built on July 22, 2020, 11:41 p.m.