print_sites_pos: Prints the positions of the identified sites

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

View source: R/print_sites_pos.R

Description

Prints the positions of the identified sites of interest, which are defined by the radius and circle centre.

Usage

1
print_sites_pos(Name,R, first = 'n', number_sites=-1, save="n")

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

save

if 'y', the results will be saved as a csv file

Details

For a given radius value the already identified sites' positions are clearly printed as a table, where their positions are given by the x and y coordinates of the circle centres. There is also the option of saving the data in a csv file, with the title 'Name'_sites_R'R'.csv.

Value

Prints a summary of the site positions.

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 Alt_Alg to find the residence times. Sites can be used to find the coordinates of the site's centres and number of identified sites of interest from the csv files produced by Alt_Alg.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##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"])

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

##Print the coordinates of the centres of all identified sites
print_sites_pos("OU_14",0.3,first='y')

##There is also the option of saving the results as a csv file
print_sites_pos("OU_14",0.3,first='y')

##Reset the original working directory
setwd(wd)

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