Commit 1bc0c918 authored by Chris Holbrook's avatar Chris Holbrook

hotfix missing sysdata.rda

parents 362b60de 83077484
......@@ -2,8 +2,8 @@ Package: glatos
Type: Package
Title: A package for the Great Lakes Acoustic Telemetry Observation System
Description: Functions useful to members of the Great Lakes Acoustic Telemetry Observation System www.glatos.glos.us; many more broadly relevant to simulating, processing, analysing, and visualizing acoustic telemetry data.
Version: 0.4.1.9000
Date: 2020-02-07
Version: 0.4.1.9001
Date: 2020-02-17
Depends: R (>= 3.2.0)
Imports:
av,
......
......@@ -3,7 +3,7 @@
# glatos 0.4.1
#### 2019-11-13
#### 2020-02-12
### Bug fixes
......@@ -12,6 +12,15 @@
(e.g., `panel.first` and `panel.last`) had to be wrapped in `quote`
- fixes issue #87
- summarize_detections
- fix error in documentation listing all three summ_type options as
default
- fixes issue #94
- check_dependencies
- ensure that glatos package directory is checked for ffmpeg.exe
- fixes issue #95
----
# glatos 0.4.0
......
......@@ -95,8 +95,8 @@
#' \item{\code{locations}: character string with
#' locations detected, separated by spaces.}
#' }
#' If \code{summ_type = "location"} (default): A data frame, data.table, or
#' tibble containing seven columns:
#' If \code{summ_type = "location"}: A data frame, data.table, or
#' tibble containing eight columns:
#' \itemize{
#' \item{\code{LOCATION_COL}: defined by \code{location_col}.}
#' \item{\code{num_fish}: number of unique animals detected.}
......@@ -108,7 +108,7 @@
#' \item{\code{animals}: character string with animal_ids detected,
#' separated by spaces.}
#' }
#' If \code{summ_type = "both"} (default): A data frame, data.table, or tibble
#' If \code{summ_type = "both"}: A data frame, data.table, or tibble
#' containing seven columns:
#' \itemize{
#' \item{\code{animal_id}: described above.}
......
File added
......@@ -31,15 +31,25 @@
##' available (Windows, Mac, and Linux) at
##' \url{https://qgis.org/en/site/forusers/download.html}.
##'
##' @details Installation of the ffmpeg library on windows is
##' @details The simplest way to install FFMPEG for use by the 'glatos' package
##' functions is to use the \code{install_ffmpeg} function, which downloads
##' the excecutable from one of the websites listed below (depending on
##' operating system) and places it in the 'glatos' package directory.
##' \code{make_video} and other \code{glatos} functions that call ffmpeg will
##' from that location. The downside to this method is that
##' \code{install_ffmpeg} will need to be run each time the \code{glatos}
##' package is re-installed. For more permanent installations of FFMPEG, see
##' directions below, by operating system.
##'
##' @details Full installation of the ffmpeg library on windows is
##' accomplished by downloading the recent 'static' build from
##' \url{http://ffmpeg.zeranoe.com/builds/}. After the download is
##' \url{http://ffmpeg.zeranoe.com/builds/}. After the download is
##' complete, use your favorite compression utility to extract the
##' downloaded folder. Decompress the package and store contents on
##' your computer. Last, Edit your system path variable to include
##' your computer. Last, edit your system path variable to include
##' the path to the directory containing ffmpeg.exe
##'
##' @details Installation of ffmpeg on Mac is similar to
##' @details Full installation of ffmpeg on Mac is similar to
##' windows. First, download most recent build from
##' \url{http://www.evermeet.cx/ffmpeg/}. The binary files are
##' compressed with 7zip so may need toinstall an unarchiving
......@@ -47,9 +57,9 @@
##' extract the program folder. After the folder is extracted, copy
##' the ffmpeg folder to /usr/local/bin/ffmpeg on your machine.
##'
##' @return results of checks to your terminal
##' @return A message is printed to the console.
##'
##' @author Todd Hayden
##' @author Todd Hayden, Chris Holbrook
##'
##' @examples
##'\dontrun{
......@@ -67,30 +77,30 @@ check_dependencies <- function(){
suppressWarnings(gdalUtils::gdal_setInstallation())
valid_install <- !is.null(getOption("gdalUtils_gdalPath"))
if(valid_install){
message(sprintf("OK... gdal version %s is installed",
getOption("gdalUtils_gdalPath")[[1]]$version))
message(sprintf(" OK... gdal version %s is installed",
getOption("gdalUtils_gdalPath")[[1]]$version), "\n")
} else {
message(paste0("gdal not found.\n",
"To install gdal, see:\n",
"\t- http://www.gdal.org\n",
"\t- https://trac.osgeo.org/osgeo4w\n",
"\t- https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries\n",
"or to install QGIS (gis software), see:\n",
"\t- https://qgis.org/en/site/forusers/download.html"))
message(" gdal not found.\n",
" To install gdal, see:\n",
"\t- http://www.gdal.org\n",
"\t- https://trac.osgeo.org/osgeo4w\n",
"\t- https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries\n",
" or to install QGIS (gis software), see:\n",
"\t- https://qgis.org/en/site/forusers/download.html")
}
# check for ffmpeg installation
message("Checking for ffmpeg...")
# check for FFmpeg
ffmpeg <- Sys.which("ffmpeg")
if(ffmpeg != ""){
message("OK... FFmpeg is installed and on system PATH.")
# check for ffmpeg
message("Checking for ffmpeg...")
ffmpeg <- tryCatch(list(found = TRUE, value = glatos:::get_ffmpeg_path(NA)),
error = function(e) list(found = FALSE, value = e$message))
# print message with result
if(ffmpeg$found) {
message(" OK... FFmpeg is installed at \n ", ffmpeg$value, ".", "\n")
} else {
message(paste0("FFmpeg not found.\n",
"To install in glatos package directory see \n",
"\t- ?install_ffmpeg\n",
"To install and set system PATH variable, see:\n",
"\t- https://www.ffmpeg.org\n",
"\t- ?check_dependencies"))
message(ffmpeg$value, "\n")
}
}
......@@ -98,16 +98,17 @@ get_ffmpeg_path <- function(ffmpeg){
ffVers <- suppressWarnings(system2(cmd, "-version", stdout=F)) #call ffmpeg
if(ffVers == 127)
stop(paste0('"ffmpeg" was not found.\n',
"See install_ffmpeg() to install into the package directory.\n",
"or ",
'ensure it is installed add added to system PATH variable\n',
"or specify path using input argument 'ffmpeg'\n\n",
'FFmpeg is available from:\n https://ffmpeg.org/\n',
'You may create the individual frames and then combine them\n',
'into an animation manually using video editing software\n',
'(e.g., Windows Movie Maker or iMovie) by setting the animate\n',
'argument to FALSE.'),
stop(" ffmpeg.exe was not found.\n\n",
" To install ffmpeg the easiest way (for use only by this package),\n",
" see ?install_ffmpeg to install into the glatos package directory.\n",
" Note that install_ffmpeg will need to be run each time the glatos\n",
" package is installed.\n\n",
" To install ffmpeg more permanently, download ffmpeg.exe from\n",
" https://ffmpeg.org/ and then either (1) add the path to directory\n",
" containing ffmpeg.exe to your operating system Path variable or\n",
" (2) in calls to glatos functions 'make_frames', 'make_video', \n",
" or 'adjust_playback_time', specify path to ffmpeg.exe using input\n",
" argument 'ffmpeg'.\n\n",
call. = FALSE)
return(ffmpeg)
......
......@@ -35,7 +35,8 @@ blue_shark_att <- convert_otn_erddap_to_att(blue_shark_detections,
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path(".","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(blue_shark_att, rda_file)
#for exported ('public') data
......
......@@ -11,5 +11,5 @@ blue_shark_detections <- read_otn_detections(dtc_file)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(blue_shark_detections, rda_file)
......@@ -53,7 +53,7 @@ glatos_detection_schema$v1.3 <- read.table(text = "
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(glatos_detection_schema, rda_file)
#for exported ('public') data
......
......@@ -46,7 +46,7 @@ glatos_receivers_schema$v1.0 <- read.table(text = "
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(glatos_receivers_schema, rda_file)
#for exported ('public') data
......
......@@ -175,7 +175,7 @@ glatos_workbook_schema$v1.3$tagging <- read.table(text="
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(glatos_workbook_schema, rda_file)
#for exported ('public') data
......
......@@ -11,7 +11,7 @@ lamprey_detections <- read_glatos_detections(dtc_file)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(lamprey_detections, rda_file)
#for exported ('public') data
......
......@@ -9,7 +9,7 @@ lamprey_tag_specs <- read_vemco_tag_specs(tag_file, file_format = "vemco_xls")
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(lamprey_tag_specs, rda_file)
#for exported ('public') data
......
......@@ -24,7 +24,7 @@ otn_deployments_schema <- read.table(text = "
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(otn_deployments_schema, rda_file)
#for exported ('public') data
......
......@@ -29,5 +29,5 @@ otn_detection_schema <- read.table(text = "
#add to sysdata.rda
rda_file <- file.path("..", "R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(otn_detection_schema, rda_file)
......@@ -10,7 +10,7 @@ sample_receivers <- read_glatos_receivers(rec_file)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(sample_receivers, rda_file)
#for exported ('public') data
......
......@@ -64,7 +64,7 @@ vemco_tag_spec_schema$vemco_xls$`tag summary` <- read.table(text = '
#---------------------------------
#add to sysdata.rda
rda_file <- file.path("..","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(vemco_tag_spec_schema, rda_file)
#for exported ('public') data
......
......@@ -19,7 +19,7 @@ walleye_att <- convert_glatos_to_att(walleye_detections, rcv)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path(".","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(walleye_att, rda_file)
#for exported ('public') data
......
......@@ -11,7 +11,7 @@ walleye_detections <- read_glatos_detections(dtc_file)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path(".","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(walleye_detections, rda_file)
#for exported ('public') data
......
......@@ -9,7 +9,7 @@ walleye_workbook <- read_glatos_workbook(wb_file)
#----------------------------------------------------
#add to sysdata.rda
rda_file <- file.path(".","R/sysdata.rda")
rda_file <- file.path("R/sysdata.rda")
glatos:::add_internal_data(walleye_workbook, rda_file)
#for exported ('public') data
......
......@@ -7,7 +7,7 @@
check_dependencies()
}
\value{
results of checks to your terminal
A message is printed to the console.
}
\description{
Checks to make sure external dependencies required by functions in
......@@ -42,15 +42,25 @@ Installation of the GDAL library and a number of other
available (Windows, Mac, and Linux) at
\url{https://qgis.org/en/site/forusers/download.html}.
Installation of the ffmpeg library on windows is
The simplest way to install FFMPEG for use by the 'glatos' package
functions is to use the \code{install_ffmpeg} function, which downloads
the excecutable from one of the websites listed below (depending on
operating system) and places it in the 'glatos' package directory.
\code{make_video} and other \code{glatos} functions that call ffmpeg will
from that location. The downside to this method is that
\code{install_ffmpeg} will need to be run each time the \code{glatos}
package is re-installed. For more permanent installations of FFMPEG, see
directions below, by operating system.
Full installation of the ffmpeg library on windows is
accomplished by downloading the recent 'static' build from
\url{http://ffmpeg.zeranoe.com/builds/}. After the download is
\url{http://ffmpeg.zeranoe.com/builds/}. After the download is
complete, use your favorite compression utility to extract the
downloaded folder. Decompress the package and store contents on
your computer. Last, Edit your system path variable to include
your computer. Last, edit your system path variable to include
the path to the directory containing ffmpeg.exe
Installation of ffmpeg on Mac is similar to
Full installation of ffmpeg on Mac is similar to
windows. First, download most recent build from
\url{http://www.evermeet.cx/ffmpeg/}. The binary files are
compressed with 7zip so may need toinstall an unarchiving
......@@ -66,5 +76,5 @@ check_dependencies()
}
\author{
Todd Hayden
Todd Hayden, Chris Holbrook
}
......@@ -72,8 +72,8 @@ If \code{summ_type = "animal"} (default): A data frame, data.table, or
\item{\code{locations}: character string with
locations detected, separated by spaces.}
}
If \code{summ_type = "location"} (default): A data frame, data.table, or
tibble containing seven columns:
If \code{summ_type = "location"}: A data frame, data.table, or
tibble containing eight columns:
\itemize{
\item{\code{LOCATION_COL}: defined by \code{location_col}.}
\item{\code{num_fish}: number of unique animals detected.}
......@@ -85,7 +85,7 @@ If \code{summ_type = "animal"} (default): A data frame, data.table, or
\item{\code{animals}: character string with animal_ids detected,
separated by spaces.}
}
If \code{summ_type = "both"} (default): A data frame, data.table, or tibble
If \code{summ_type = "both"}: A data frame, data.table, or tibble
containing seven columns:
\itemize{
\item{\code{animal_id}: described above.}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment