Sites: Finds the number of sites of interest from already calculated...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Sites.R

Description

Finds the number of sites of interest as well as other information from already calculated residence times.

Usage

1
Sites(Name, R, first = 'n', number_sites = -1)

Arguments

Name

name of the data, which is used for any saved files and plot titles

R

radius value to use

first

if 'y', the algorithm will look for the second greatest maximum percent drop if the first results in the first circle being the only non-identified site

number_sites

number of sites to manually show the results for

Details

This function finds all the necessary information from the results of the already applied algorithm Alt_Alg. It returns information relating to both the non-overlapping circles and also the identified sites, which is then used by other functions. The information is extracted from the already saved csv files.

Value

sites_index - array of indices of the sites of interest among all the circles

N_no_overlap - number of non-overlapping circles

X_no_overlap - x-coordinates of non-overlapping circles

Y_no_overlap - y-coordinates of non-overlapping circles

X_sites - x-coordinates of identified sites of interest

Y_sites - y-coordinates of identified sites of interest

max_percent_drop - maximum percent drop

number_identified_sites - number of identified sites

psi_sort_no_overlap2 - ordered list of non-overlapping residence times

Author(s)

Rhys Munden <rdmunden1@sheffield.ac.uk>

References

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

See also Alt_Alg to find the residence times.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
##Find the current working directory
wd = getwd()
##Set the working directory as the temporary one
setwd(tempdir())
##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"])

##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')

##Calculate all the necessary information to be used elsewhere
Sites("OU_14",0.3,first='y')

##Reset the original working directory
setwd(wd)

SitesInterest documentation built on May 2, 2019, 4:25 a.m.