Learn R Programming

⚠️There's a newer version (1.3.0) of this package.Take me there.

Jump to installation instructions

actel

of non-interactive code*

Read the latest news here!

Overview

If you are using acoustic telemetry to track animals as they move inside a study area or as they migrate somewhere, actel is the package for you. By bringing together the study area configuration and the recorded detections, actel provides a systematic way of analysing animal migration and residency data.

Main functions:

1. explore()

explore() allows you to quickly get a summary of your data. You can use explore() to get a general feel for the study results, and check if the input files are behaving as expected. It is also a good candidate if you just want to validate your detections for later use in other analyses.

2. migration()

The migration() analysis runs the same initial checks as explore(), but on top of it, it analyses the animal behaviour. By selecting the arrays that lead to success, you can define whether or not your animals survived the migration. Additional plots help you find out if some animal/tag has been acting odd. Multiple options allow you to tweak the analysis to fit your study perfectly.

3. residency()

The residency() analysis runs the same initial checks as explore(), but, similarly to migration, explores particular points of the animal behaviour. If you want to know where your animals were in each day of the study, how many animals were in each section each day, and other residency-focused variables, this is the analysis you are looking for!

Unlock actel's full potential

To truly learn how to operate actel, you must read the package vignettes. These have been arranged so that you can prepare your analysis as you learn; quite soon you will get your first results!

Here are some examples:

Movement tables:

ArrayDetectionsFirst stationLast stationFirst timeLast timeTime travellingTime on array
River114St.1St.22019-05-15 10:30:002019-05-15 13:00:0025:20:142:30:00
River23St.4St.42019-05-15 13:50:002019-05-15 14:40:000:50:000:50:00
River38St.5St.62019-05-15 16:00:002019-05-15 16:20:001:20:000:20:00
Fjord221St.10St.112019-05-16 15:10:002019-05-16 18:00:0022:50:002:50:00
Sea11St.18St.182019-05-18 09:45:002019-05-18 09:45:0015:45:000:00:00

Detection graphics

Times of arrival and summary information

Array efficiency and tag progression

Individual residency

Global residency

Installing actel

CRAN version: 1.2.1

actel is available on CRAN. To install the latest stable version, simply run:

install.packages("actel")

Development version

If you would like to install the latest updates (which have not been integrated to CRAN yet), you can run the line below. Note that you need to have the package remotes installed!

remotes::install_github("hugomflavio/actel", build_opts = c("--no-resave-data", "--no-manual"), build_vignettes = TRUE)

Have a look at the manual:

After installing, you should read the package vignettes (i.e. the manual), which can be found by running:

browseVignettes("actel")

Note:

  1. If you are getting "pandoc document conversion" errors during the package installation, try installing the newest version of pandoc, restarting R and trying again.

* interactive code (i.e. code that expects user input) cannot be tested automatically using codecov and, as such, was excluded from the codecov scope.

Copy Link

Version

Install

install.packages('actel')

Monthly Downloads

473

Version

1.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Hugo Fl<c3><a1>vio

Last Published

January 5th, 2021

Functions in actel (1.2.1)

assembleResidency

Collect summary information for the residency analysis
advEfficiency

Calculate beta estimations for efficiency
actel

actel: Acoustic Telemetry Data Analysis
assembleArrayCJS

Combine the individual CJS's of each array into a single table
appendTo

Append to ...
additional.residency.results

Example residency results
assembleGroupCJS

Assembles CJS tables for all groups
actel-deprecated

Deprecated functions in package actel.
assembleValidSecMoves

Wrapper for sectionMovements
assembleMatrices

Assemble detection matrices
assembleOutput

Create status.df
blameArrays

Find which arrays to blame for a jump in movement events
checkMinimumN

Check that the tag have enough detections to be valid
checkDupSignals

Check if there are duplicated signals in the detected tags.
checkDeploymentTimes

Confirm that receivers were not re-deployed before being retrieved
checkNoDetections

Check if there are detections matching the target tags.
checkGUI

Check if the dependencies required to open a GUI are installed, and if opening a GUI does not throw an error. Some code adapted from RGtk2's .onLoad function.
copyOfCirclePlotRad

circular:::circlePlotRad
checkDeploymentStations

Confirm that the station names in the deployments table match those listed in the spatial file
check_args

check.R arguments
convertTimes

Convert Times
copyOfRosediagRad

circular:::RosediagRad
checkUpstream

Check for movements upstream of the release site.
assembleSectionOverview

Create section.overview
createNewEvents

Upon invalidating detections, recombines the remaining valid detections into new events, and merges them with the remaining events.
assembleSplitCJS

Assembles CJS tables for all group x release site combinations
assembleTimetable

Create the timetable
countArrayFailures

Find and list arrays which failed during the movements of the tags
breakMatricesByArray

Break the detection matrices per array
circularSection

Draw a section on the outside of the circle
checkDetectionsBeforeRelease

Check if there are detections for the target tags before release.
combineCJS

Combine multiple CJS models
checkDupDetections

Check if there are duplicated detection in the input data
dualArrayCJS

Calculate estimated last-array efficiency
compileDetections

Combine ALS detections
cjs_args

CJS.R arguments
createUniqueSerials

Include the deployment in the serial number of the receive
createWorkspace

Create a Default Workspace
decimalTime

Convert hh:mm:ss time to hh.hhh
checkInactiveness

Find if a tag is standing still in an array
checkImpassables

Find out if a tag moved in an impossible direction
discardFirst

Discard early detections
invalidateEvents

Allow the user to determine a given movement event invalid
checkLinearity

Check that the tag linearly moved along the sections
completeMatrix

Complete a Distances Matrix
convertCodes

Convert code spaces
checkJumpDistance

Check if tags are jumping over arrays
checkSpeeds

check tag speeds against defined thresholds (in m/s)
checkTagsInUnknownReceivers

Check for target data in the unknown receivers
example.detections

Example detection data
checkArguments

Check argument quality
dotPaths

Find arrays valid for efficiency calculation
deleteHelpers

Delete temporary files
countBackMoves

Count backwards movements
darken

darken colours
example.results

Example migration results
efficiencyMatrix

Compile inter-array detection matrix
plotSensors

Plot sensor data for a single tag
dualMatrix

Compile detection matrix for last array
explore

Explorative Analysis
loadDetections

Load ALS detections
expandEvent

Handler for event expansion
detectionsSingleWidget

Detections Widget (Single table version)
assembleValidMoves

Wrapper for simplifyMovements
printMigrationRmd

Print Rmd report
fact

nearsq helper
getSpeeds

Extract speeds from the analysis results.
distancesMatrix

Calculate Distances Matrix
example.spatial

Example spatial data
createEventRanges

collapse event indexes into ranges
loadBio

Load Biometrics file
findDirectChains

Find all arrays linked to an array in a given direction
detectionsTabbedWidget

Detections Widget (Tabbed version)
emergencyBreak

Standard procedure when aborting
globalRatios

Calculate number/percentage of tags at each location for each day
emptyMatrix

Create a Template Distances Matrix
checkToken

Verify that the source data has been compiled using actel's preload function
movementTimes

Calculate movement times
getResidency

Assemble residency tables per tag
dotList

Break the dot data frame into a list
combine

Combine a list of vectors
collectStrays

Collect summary information on the tags detected but that are not part of the study.
checkUnknownReceivers

Find detections from unknown receivers
checkReport

Check report compatibility
getDualMatrices

Prepare intra-array matrices for selected arrays
example.distances

Example distances matrix
createStandards

Standardize serial numbers, stations and arrays in the detections
findPeers

Find efficiency peers for each array
gg_colour_hue

Generate default ggplot colours
example.biometrics

Example biometric data
splitN

Split a dataframe every nth row
migration

Migration Analysis
plotDetections

Plot detections for a single tag
match.POSIXt

Match POSIX values
graphicalInvalidate

Opens a new window that allows the user to determine movement event invalidity
dotMatrix

Create numerical distances between dot elements
loadStudyData

Load, structure and check the inputs
loadDeployments

Load deployments file and Check the structure
checkSMovesN

Verify number of detections in section movements
resRatiosIndOut

compile output of dailyRatios
getTimes

Extract timestamps from the analysis results.
myRoseDiag

Edited rose diagram function
exampleWorkspace

Deploy Example Data
extractCodeSpaces

Extract Code Spaces from transmitter names
excludeTags

Collect summary information on the tags detected but that are not part of the study.
example.deployments

Example deployment data
preloadDetections

Run quality checks on preloaded detections
printArrayOverview

print Rmd fragment for inclusion in the report
oneWayMoves

Trim movements table to contain only uni-directional movements
groupMovements

Group movements
plotLive

Plot array live times
nearsq

Find optimum plotting grid
mbSplitCJS

Calculate CJS for each group.release combination
timesToCircular

Convert a data frame with timestamps into a list of circular objects
printResidencyRmd

Print Rmd report
speedReleaseToFirst

Calculate time and speed since release.
printProgression

Print progression diagram
loadDistances

Load distances matrix
resRatios

calculate residency ratios per tag
invalidateDetections

Allow the user to determine a given set of detections invalid
dataToList

Import RData in a list format
splitDetections

Split detections by tag
processVemcoFile

Vemco files
includeIntraArrayEstimates

Incorporate intra-array estimates in the overall CJS object
printLastSection

Print a simple barplot with the number of tags last seen at each section
loadDot

Load spatial.dot
printEfficiency

Print efficiency fragment
transferValidity

Transfer validity updates from valid movements to all movements
eventsSingleWidget

Event Widget (Single table version)
plotTimes

Print circular graphics for time series.
transformSpatial

Process spatial elements
graphicalInvalidateDetections

Opens a new window that allows the user to determine detection invalidity
move_args

movements.R arguments
eventsTabbedWidget

Event Widget (Tabbed version)
plotResidency

Plot residency for a single tag
minuteTime

Convert numeric time to HH:MM
findSecondsPerSection

Calculate number of seconds at each location per day
plotMoves

Plot moves for one ore more tags
loadShape

Load shapefile and convert to a raster object.
includeMissing

Include tags that were never detected
loadSpatial

Load Spatial File
residency

Residency Analysis
plotArray

Plot simultaneous/cumulative presences at a give array or set of arrays
extractSignals

Extract signals from transmitter names
includeUnknownReceiver

Temporarily include missing receivers in the spatial object
overrideValidityChecks

Skips all validity checks for a tag and allows the user to freely invalidate events
printSurvivalGraphic

Print survival graphic
findShortestChains

Find the shortest paths between arrays
printGlobalRatios

print the distribution of tags per location
movementSpeeds

Calculate time and speed
firstArrayFailure

Determine if the first array after release has failed
printExploreRmd

Print Rmd report
readDot

Read dot file or string
printIndividualResidency

print the individual locations per day
res_efficiency

Calculate array efficiency for residency analysis
res_assembleOutput

Create status.df
liveArrayTimes

Assign live times to arrays
processThelmaOldFile

Thelma old export files
printBiometrics

Print biometric graphics
roundDown

Forcefully round a number down
printIndividuals

Print individual graphics
transitionLayer

Calculate Transition Layer
roseMean

Draw mean value in the axis margin
ringsRel

Draw rings at relative points
vectorsIntoTables

Transform vectors into data frames with specific columns
widget_args

widget_setups.R arguments
simplifyMovements

Removes invalid events
userInput

Wrap frequently used code to handle user input
matchl

TRUE/FALSE wrapper for match
mbGroupCJS

Calculate CJS for each group for each array
printDot

Print DOT diagram
recoverLog

Recover latest actel crash log
plotRatios

Plot global/group residency
processThelmaNewFile

Thelma new export files
stationName

Find original station name
std.error.circular

Calculate the standard error of the mean for circular data
resPositions

Find the location where the tag spent most time per day
printCircular

Print circular graphics for each array
setSpatialStandards

Create Standard Names for spatial elements
preload

Load a dataset before running an analysis
na.as.false

Consider NA's as FALSE
printLastArray

Print a simple barplot with the number of tags last seen at each section
simpleCJS

Analytical CJS model
user_interaction_args

user_interaction.R arguments
validateDetections

Compare original detections with the valid movements and exclude invalid detections
printSensorData

Print sensor data for each individual tag
storeStrays

Store summary information on the stray tags detected in a permanent file.
printDotplots

Print dotplots
printSectionTimes

Print arrival and departure times per section
updateValidity

update array-movement validity based on the section-movements
substrRight

Subset a character string counting from the right end
roundUp

Forcefully round a number up
stopAndReport

stop function but paste error to the report too
processStandardFile

Standard detections file created for actel
sectionMovements

Compress array-movements into section-movements
tableInteraction

Handler for table interaction events