Description Usage Arguments Details Value Author(s) Examples
View source: R/RandomBearingDraw.R
Make random draws for bearings allowing bias towards North-South or East-West
1 | RandomBearingDraw(n = 1, shape_parameter = 1)
|
n |
The number of randomly drawn bearings required. |
shape_parameter |
The shape parameter used as both values in a beta distribution. |
Nothing yet.
A vector of bearing(s) of length n.
Graeme T. Lloyd graemetlloyd@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Set seed for example:
set.seed(21)
# Unbiased random draw (N-S and E-W draws equally likely):
hist(RandomBearingDraw(n = 10000, shape_parameter = 1), xlim=c(0, 360),
breaks=36, xlab="Bearing (degrees)")
# Random draw biased towards E-W draws:
hist(RandomBearingDraw(n = 10000, shape_parameter = 10), xlim=c(0, 360),
breaks=36,xlab="Bearing (degrees)")
# Random draw biased towards N-S:
hist(RandomBearingDraw(n = 10000, shape_parameter = 0.1), xlim=c(0, 360),
breaks=36, xlab="Bearing (degrees)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.