Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 2.2 KB

README.md

File metadata and controls

55 lines (36 loc) · 2.2 KB

batplotR - BatScope Data Visualization in R

About batplotR

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.

How to install

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")

Standalone Shiny Web App

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.

Mac OS / probably other UNIX systems (tested in MacOSX 10.10.3 only)

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.

Windows

the easiest way on windows is to follow the instructions on this page: http://www.r-datacollection.com/blog/Making-R-files-executable/

Usage in R

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.