From 646d0619ca0415207e43e559c2df70f699a9e01d Mon Sep 17 00:00:00 2001 From: Ruben Perez Perez Date: Wed, 10 Feb 2021 00:21:46 +0100 Subject: [PATCH] updated documentation --- DESCRIPTION | 3 ++- NAMESPACE | 1 + R/divewatchr.R | 13 +++++++++++++ R/logbook_map.R | 3 ++- files/overview.Rmd | 3 ++- man/divewatchr.Rd | 13 +++++++++++++ 6 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 R/divewatchr.R create mode 100644 man/divewatchr.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 9b12b30..9c8683f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,6 +22,7 @@ Imports: dplyr, stringr, rmarkdown, forcats, - tidyr + tidyr, + htmltools Depends: R (>= 2.10) diff --git a/NAMESPACE b/NAMESPACE index bcc266c..288bcab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,6 +15,7 @@ import(dplyr) import(forcats) import(ggplot2) import(googlesheets4) +import(htmltools) import(leaflet) import(rmarkdown) import(scales) diff --git a/R/divewatchr.R b/R/divewatchr.R new file mode 100644 index 0000000..070111a --- /dev/null +++ b/R/divewatchr.R @@ -0,0 +1,13 @@ +#' divewatchr: A package for visualizing and exploring a SCUBA Diving Logbook +#' +#' This package allows for a thorough visualization of a diving logbook, +#' including spatio-temporal and categorical plots and maps. +#' The divewatchr package provides functions to read data from a diving logbook, +#' create informative maps, plots and data frames about the dataset and to create +#' descriptive reports about the diving logbook +#' +#' +#' @docType package +#' @name divewatchr +NULL +#> NULL \ No newline at end of file diff --git a/R/logbook_map.R b/R/logbook_map.R index 7f519c9..785e1c0 100644 --- a/R/logbook_map.R +++ b/R/logbook_map.R @@ -9,6 +9,7 @@ #' @author Ruben Perez Perez #' #' @import leaflet +#' @import htmltools #' #' @return Returns a map. #' @@ -49,7 +50,7 @@ m %>% addProviderTiles('Esri.WorldImagery') %>% # can also try CartoDB.VoyagerOn ifelse(is.na(platformType), "", paste0(" - ", platformType)), ifelse(is.na(diveType_3), "", paste0(" - ", diveType_3)))), popupOptions = popupOptions(), # Change size, opacity, etc - label = lapply(labs, htmltools::HTML), + label = lapply(labs, HTML), labelOptions = labelOptions(direction = "left", opacity = 0.9, style = list( diff --git a/files/overview.Rmd b/files/overview.Rmd index 07194aa..e646d2e 100644 --- a/files/overview.Rmd +++ b/files/overview.Rmd @@ -143,7 +143,8 @@ This data frame shows the diving logbook used. Personal information such as even ```{r echo=FALSE, rows.print=15} load('data/scuba_clean.RData') -dplyr::transmute (scuba_clean, eventDate, locationID, locality, maximumDepth = maximumDepthInMeters, bottomTime, diveType, diveClass, platformType, region, country) + +knitr::kable(dplyr::transmute (scuba_clean, eventDate, locationID, locality, maximumDepth = maximumDepthInMeters, bottomTime, diveType, diveClass, platformType, region, country)) ``` *** diff --git a/man/divewatchr.Rd b/man/divewatchr.Rd new file mode 100644 index 0000000..fd18a24 --- /dev/null +++ b/man/divewatchr.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/divewatchr.R +\docType{package} +\name{divewatchr} +\alias{divewatchr} +\title{divewatchr: A package for visualizing and exploring a SCUBA Diving Logbook} +\description{ +This package allows for a thorough visualization of a diving logbook, +including spatio-temporal and categorical plots and maps. +The divewatchr package provides functions to read data from a diving logbook, +create informative maps, plots and data frames about the dataset and to create +descriptive reports about the diving logbook +}