| add_rel_pos_coords | R Documentation | 
This function calculates the x and y coordinates of a neighbor in the reference frame of the focal individual.
add_rel_pos_coords(data, focal_heading = c(0, 1))
data | 
 Dataframe with the bearing angle and distance of each individual to specific neighbors. Column names must include: bangl, nnd.  | 
focal_heading | 
 The heading of the focal individual, default = c(0,1) for plotting neighbor heading north.  | 
The input dataframe with additional nnx (nearest neighbor x coordinate)
and nny (nearest neighbor y coordinate) columns.
Marina Papadopoulou m.papadopoulou.rug@gmail.com
data <- data.frame(
bangl = runif(25, 0, pi),
nnd = runif(25)
)
data <- add_rel_pos_coords(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.