Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/plot_radii_results.R
Plots the results (maximum percent drop and number of identified sites) from already calculated residence times for different radii values.
1 | plot_radii_results(Name, Radii, first = 'n', legend_loc = "topright")
|
Name |
name of the data, which is used for any saved files and plot titles |
Radii |
set of radius values |
first |
if |
legend_loc |
location of the legend |
After finding the residence times for various radii values using Alt_Alg
, this function plots the number of identified sites of interest and their corresponding maximum percent drops for each radii value. This plot could be used to identify which radius value to use.
Plot of results from various radius values
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 number of identified sites of interest and corresponding maximum percent drop 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 | ##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"])
##Run the algorithm for multiple radii values
Radii=seq(0.2,1.0,0.1)
for (R in Radii){
Alt_Alg("OU_14",t,X,Y,R,first='y',save='y')}
##Plot the results (i.e. maximum percent drop and number of sites identified) from applying
##the algorithm with various radius values
plot_radii_results("OU_14",Radii,first='y')
##The location of the legend can be changed
plot_radii_results("OU_14",Radii,first='y', legend_loc="bottomleft")
##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.