Description Usage Arguments Details Value Author(s) References See Also Examples
Plots the trajectory of the animal with the different hoops (sites of interest, removed circles and other circles) overlaid.
1 2 3 |
x |
array of the x-coordinates describing the trajectory |
y |
array of the y-coordinates describing the trajectory |
Name |
name of the data, which is used for any saved files and plot titles |
R |
radius value to use |
first |
if |
colours |
list of the hoops' colours |
lwds |
list of hoop widths |
number_sites |
number of sites to manually show the results for |
... |
additional arguments to plot |
This function plots the trajectory of the animal with the identified sites of interest, removed circles and other circles plotted on top. The colours of the three types of the circles and their widths can also be defined. This can be used to see visually where the sites are along the trajectory.
Plot of the identified sites' positions
Rhys Munden <rdmunden1@sheffield.ac.uk>
Munden, R., Borger , L., Wilson, R.P., Redcliffe, J., Loison, A., Garel, M. and Potts, J.P. in review. Making sense of ultra-high-resolution movement data: an algorithm for inferring sites of interest.
See also Alt_Alg
to find the residence times. Sites
can be used to find the coordinates of the centres of the sites and non-overlapping circles from the csv files produced by Alt_Alg
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ##Find the current working directory
wd = getwd()
##Set the working directory as the temporary one
setwd(tempdir())
##Load the data
data(OU_14)
t=unlist(OU_14["t"])
X=unlist(OU_14["X"])
Y=unlist(OU_14["Y"])
class(X) = "hoops"
class(Y) = "hoops"
##Calculate the residence time with a radius of 0.3 and not including the first circle
Alt_Alg("OU_14",t,X,Y,0.3,first='y',save='y')
##Plot the positions of the identified sites as well as the non-overlapping circles
plot(X,Y,"OU_14",0.3)
##The colours for the hoops can be changed
plot(X,Y,"OU_14",0.3,first='y',colours=c('tan','chocolate','maroon'))
##The thickness of hoops can also be changed
plot(X,Y,"OU_14",0.3,first='y',lwds=c(0.5,2,3.5))
##It is also possible to manually choose the number of sites
plot(X,Y,"OU_14",0.3,first='y',number_sites=4)
##Reset the original working directory
setwd(wd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.