plotMAP: Plotting trips from a central-placve foraging species

Description Usage Arguments Details Value Examples

View source: R/plotMAP.R

Description

This function was developped for giving a quick visual on your trips. Land basemap and bathymetry is also render automatically when calling the function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotMAP(
  allbirds,
  pmap = FALSE,
  path = NULL,
  w = 12,
  h = 12,
  units = "cm",
  ColLong = NULL,
  ColLat = NULL
)

Arguments

pmap

logical. Should every plot be plotted in your active session? Depending of the number of single trip you have, this might generate a lot of plots

path

path indicating where the plots should be saved

w

width of the plot. Unit to select in the units argument. Passing to ggsave() function

h

height of the plot. Unit to select in the units argument. Passing to ggsave() function

units

unit to consider for plotting e.g. c("mm", "cm"). Passing to ggsave() function

ColLat

vector indicating the latitude of the colony and have the same length as your data frame. If nothing is passed to that argument, the function will automatically take the first longitude of the trip as the colony's latitude

df

data frame containing all the trips. For now, passing only CPFMove object

ColLonga

vector indicating the longitude of the colony and have the same length as your data frame. If nothing is passed to that argument, the function will automatically take the first longitude of the trip as the colony's longitude

Details

This function has been designed orignally to facilitate the visual inspection of various filtering parameters on the actual trips. Howerver, we plan to make this function more general as soon as possible. This function use mainly the plotting function from the package [ggOceanMaps](https://mikkovihtakari.github.io/ggOceanMaps/)

Value

This function returns a number equal as the number of unique trips in your dataset. If the argument pmap is TRUE the plots will also be returned in R

Examples

1
2
3
4
5
## Not run: 
path <- c("C:/Users/philip/Desktop/test")
test <- plotMAP(f, pmap = F, path = path, ColLong = f$ColLong, ColLat = f$ColLat)

## End(Not run)

PhilBertrand/CPFMove documentation built on Nov. 22, 2020, 4:45 a.m.