batplotR
is a R
package to visualize data generated with BatScope and allows simple visualization of short (one night) and long (many nights) time-series of ultrasound calls recorded with a BatLogger. All you need is a Excel file export from BatScope. Most functions can be accessed from within a Shiny web-app.
To install batplotr
you need the remotes
package which can be installed from CRAN. Once installed you can run the following code to get the latest version batplotr
:
remotes::install_github("dcangst/batplotr")
The package includes the function shiny_batPlots()
. It launches a shiny web app that replicates most futures of the package in a web app. For ease of use you can set up a script to launch the web app directly from your computer.
Paste the following code into a plain text file with extension '.command'
#!/usr/bin/Rscript
remotes::install_github("dcangst/batplotr",dependencies=TRUE)
suppressMessages(library(batplotr))
shiny_batPlots()
The file then needs to be made executable, which you can do in the terminal using the following command:
chmod +x /path/to/shellfile.command
(you can drag and drop the file into the terminal so you don't have to type the path). This Script will install or update all necessary components and launch the shiny web app.
the easiest way on windows is to follow the instructions on this page: http://www.r-datacollection.com/blog/Making-R-files-executable/
see ?batplotr
for more information on the individual functions. For simple plots run this example using a .xlsx generated by BatScope Export
batScopeData <- readBatscopeXLSX()
batScopeData_sum <- sumBatscopeData()
nightPlot(batScopeData_sum)
periodPlot(batScopeData_sum)
there is also a more detailed manual here, but unfortunately in German only.