The content on this page assumes that 1) You are familiar with handling R objects and 2) you are familiar with the the traditional input files for actel. If you do not know which inputs are necessary to run actel, you can find more information about them in the first page of the manual.
If you are working with large databases, or retrieving your detection data from a server (such as ETN or OTN), it may be impractical to have to save all the data into CSV files to be able to run actel analyses. To help you out, I have created the function
preload(), which pre-compiles R objects into a format that is actel-compatible.
preload()call run during the same R session. This is to ensure that the data is correctly formatted and up to date.
To run the
preload() function, you must first create four R objects, equal in structure to their CSV counterparts: biometrics, spatial, deployments and detections. Additionally, you also need to set the
Once you have these four objects, you can run
x <- preload(biometrics = biometrics, spatial = spatial, deployments = deployments, detections = detections, tz = "Europe/Copenhagen")
You can then use the resulting object to run an actel analysis:
If you want to use
preload() and include a distances matrix or the equivalent of a ‘spatial.txt’ file, you must use the
dot arguments (respectively). I recommend that you calculate the distances matrix using the actel functions provided for that (more details in this page). As for the dot argument, simply create a string that looks like what your ‘spatial.txt’ file would have looked like. e.g:
# You can create multiple lines, just like in the spatial.txt case: dot <- "River0 -- River1 -- River3 -- River4 -- River5 -- River6 -- Fjord1 -- Fjord2 -- Sea1 River1 -- River2 -- River3" x <- preload(biometrics = biometrics, spatial = spatial, deployments = deployments, detections = detections, distances = distances, dot = dot, tz = "Europe/Copenhagen")
If your final goal is to run a
residency() analysis, remember to have a ‘Section’ column in your spatial input. Apart from that, the process is exactly the same! Load your data using preload, and then source the loaded datapack into the analysis functions:
preload() function also contains the following arguments:
stop.time. These perform exactly the same tasks as their counterparts on the main functions.
If you load detections through
preload(), they will be required to have four specific columns: Timestamp, Receiver, CodeSpace and Signal. You can use the functions
extractSignals() to help you out if needed. On top of these four columns, you can include two columns for sensor data: Sensor.Value and Sensor.Unit (notice the capital first letters). On top of these six columns, you can include as many columns as you want! These extra columns will be carried through the main analyses and exported in the