powered by
Pad circular data on both ends
pad_circ( data, circ_var, circ_borders = c(-90, 90), circ_part = 1/6, verbose = FALSE )
a padded data.table
data.table to pad
circular variable
range of the circular variable
padding proportion
print extra info
Pads the data by adding a part of the data (default: 1/6th) from one end to another end. Useful to roughly account for circularity when using non-circular methods.
dt <- data.table(x = runif(1000, -90, 90), y = rnorm(1000)) pad_circ(dt, "x", verbose = TRUE)
Run the code above in your browser using DataLab