diff --git a/.github/ISSUE_TEMPLATE/nieuwe-functie-aanmaken.md b/.github/ISSUE_TEMPLATE/nieuwe-functie-aanmaken.md index a84559b..9e97185 100644 --- a/.github/ISSUE_TEMPLATE/nieuwe-functie-aanmaken.md +++ b/.github/ISSUE_TEMPLATE/nieuwe-functie-aanmaken.md @@ -17,6 +17,7 @@ assignees: '' - [ ] voorzie uitleg over de input parameter(s) met `#' @param name` - [ ] voorzie uitleg over de output van de functie met `#' @returns` - [ ] voorzie minstens 1 voorbeeld van het gebruik van de functie dmv `#' @examples` +- [ ] voorzie de export - tag dmv `#' @export` ([#14](https://github.com/inbo/fistools/issues/14)) - [ ] voer `usethis::use_package("packagename", min_version = TRUE)` uit in de console voor iedere package die je gebruikt. - [ ] voer `roxygen2::roxygenise()` uit in de console - [ ] voer `devtools::check()` uit in de console diff --git a/NAMESPACE b/NAMESPACE index 0b03a8f..b243bc3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,3 +1,5 @@ # Generated by roxygen2: do not edit by hand +export(check) +export(colcompare) importFrom(magrittr,"%>%") diff --git a/R/check.R b/R/check.R index 4540389..c0fbad9 100644 --- a/R/check.R +++ b/R/check.R @@ -14,6 +14,8 @@ #' @returns #' 1 = object exists in environment #' 0 = object doesn't exist in environment +#' +#' @export check <- function(x){tryCatch(if(!is.logical(class(x)) && ifelse(is.function(x), stop(), 0)) 1 else 1, error=function(e) 0)} diff --git a/R/colcompare.R b/R/colcompare.R index 0465af8..b76c134 100644 --- a/R/colcompare.R +++ b/R/colcompare.R @@ -28,6 +28,7 @@ #' colcompare(super_sleepers, super_actives) #' } #' +#' @export #' @importFrom magrittr %>% colcompare <- function(x, y){