plotRaster: Check input data quality for the RSP analysis

View source: R/plot.R

plotRasterR Documentation

Check input data quality for the RSP analysis

Description

If you are reading this it's because RSP failed to detect all of your receivers within the base raster provided, or any of your receiver location was found to be in land. This function allows you to visually identify the station(s) with problem. Please either extend your raster to include all stations or fix receiver locations to be in-water.

Usage

plotRaster(
  input,
  base.raster,
  coord.x,
  coord.y,
  size = 1,
  land.col = "#BABCBF80"
)

Arguments

input

Either a data frame containing the coordinates of the stations or the output of one of actel's main functions (explore, migration or residency).

base.raster

Raster object. Imported for example using shapeToRaster.

coord.x, coord.y

The names of the columns containing the x and y positions of the stations in the spatial object.

size

The size of the station dots

land.col

Colour of the land masses. Defaults to semi-transparent grey.

Value

A plot of your base raster extent and the receiver locations.

Examples


# Import river shapefile
water <- actel::shapeToRaster(shape = paste0(system.file(package = "RSP"), "/River_latlon.shp"), 
size = 0.0001, buffer = 0.05) 

# Create a transition layer with 8 directions
tl <- actel::transitionLayer(x = water, directions = 8)

# Import example output from actel::explore() 
data(input.example) 

# Plot raster and acoustic stations
plotRaster(input.example, base.raster = water, coord.x = "Longitude", 
 coord.y = "Latitude", size = 1)



YuriNiella/RSP documentation built on Feb. 2, 2024, 5:03 a.m.