Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidyverse #18

Merged
merged 12 commits into from
Oct 2, 2018
24 changes: 11 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
Package: n2khelper
Title: Auxiliary Functions for the Analysis and Reporting of the Natura 2000
Monitoring
Version: 0.4.1.1
Date: 2017-11-25
Authors@R: c(person("Thierry", "Onkelinx", email = "thierry.onkelinx@inbo.be", role = c("aut", "cre")))
Version: 0.4.2
Date: 2018-10-02
Authors@R: c(
person(
"Thierry", "Onkelinx", role = c("aut", "cre"),
email = "thierry.onkelinx@inbo.be",
comment = c(ORCID = "0000-0001-8804-4216")),
person(
family = "Research Institute for Nature and Forest",
role = c("cph", "fnd"), email = "info@inbo.be"))
Description: Auxiliary functions for analysing Natura 2000 monitoring data.
URL: https://doi.org/10.5281/zenodo.835732
BugReports: https://github.com/inbo/n2khelper/issues
Expand All @@ -26,14 +33,11 @@ LazyData: true
Suggests:
testthat
Collate:
'gitConnection_class.R'
'auto_commit.R'
'check_character.R'
'check_dataframe_covariate.R'
'check_dataframe_variable.R'
'check_dbtable.R'
'check_dbtable_variable.R'
'check_git_repo.R'
'check_id.R'
'check_path.R'
'check_single_character.R'
Expand All @@ -46,20 +50,14 @@ Collate:
'get_nbn_key.R'
'get_nbn_key_multi.R'
'get_nbn_name.R'
'gitConnection_class.R'
'git_connect.R'
'git_connection.R'
'git_recent.R'
'git_sha.R'
'is_chartor.R'
'is_git_repo.R'
'list_files_git.R'
'match_nbn_key.R'
'odbc_connect.R'
'odbc_get_id.R'
'odbc_get_multi_id.R'
'odbc_insert.R'
'read_delim_git.R'
'read_object_environment.R'
'remove_files_git.R'
'write_delim_git.R'
RoxygenNote: 6.0.1
32 changes: 10 additions & 22 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export(check_dataframe_covariate)
export(check_dataframe_variable)
export(check_dbtable)
export(check_dbtable_variable)
export(check_git_repo)
export(check_id)
export(check_path)
export(check_single_character)
Expand All @@ -15,31 +14,21 @@ export(check_single_posix)
export(check_single_probability)
export(connect_nbn)
export(connect_result)
export(connect_ut_db)
export(cut_date)
export(get_nbn_key)
export(get_nbn_key_multi)
export(get_nbn_name)
export(git_connect)
export(git_connection)
export(is.chartor)
export(is_git_repo)
export(match_nbn_key)
export(odbc_connect)
export(odbc_get_id)
export(odbc_get_multi_id)
export(odbc_insert)
export(read_object_environment)
exportClasses(gitConnection)
exportMethods(auto_commit)
exportMethods(git_recent)
exportMethods(git_sha)
exportMethods(list_files_git)
exportMethods(read_delim_git)
exportMethods(remove_files_git)
exportMethods(write_delim_git)
importClassesFrom(git2r,cred_ssh_key)
importClassesFrom(git2r,cred_user_pass)
importClassesFrom(git2r,git_repository)
importFrom(DBI,dbExistsTable)
importFrom(DBI,dbGetInfo)
importFrom(DBI,dbGetQuery)
Expand All @@ -60,27 +49,25 @@ importFrom(dplyr,"%>%")
importFrom(dplyr,collect)
importFrom(dplyr,count_)
importFrom(dplyr,data_frame)
importFrom(dplyr,filter)
importFrom(dplyr,filter_)
importFrom(dplyr,funs)
importFrom(dplyr,group_by_)
importFrom(dplyr,inner_join)
importFrom(dplyr,mutate_)
importFrom(dplyr,mutate_each_)
importFrom(dplyr,select)
importFrom(dplyr,select_)
importFrom(dplyr,semi_join)
importFrom(dplyr,slice_)
importFrom(dplyr,src_postgres)
importFrom(dplyr,summarise_)
importFrom(dplyr,tbl)
importFrom(dplyr,ungroup)
importFrom(git2r,add)
importFrom(git2r,commit)
importFrom(git2r,config)
importFrom(git2r,cred_ssh_key)
importFrom(git2r,cred_user_pass)
importFrom(git2r,hashfile)
importFrom(git2r,head)
importFrom(git2r,push)
importFrom(git2r,in_repository)
importFrom(git2r,repository)
importFrom(lazyeval,interp)
importFrom(lubridate,is.Date)
Expand All @@ -89,17 +76,18 @@ importFrom(lubridate,year)
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(methods,setClassUnion)
importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,setOldClass)
importFrom(methods,setValidity)
importFrom(plyr,ddply)
importFrom(rlang,.data)
importFrom(rlang,UQ)
importFrom(stats,aggregate)
importFrom(stats,as.formula)
importFrom(stats,na.fail)
importFrom(tidyr,spread)
importFrom(tidyr,spread_)
importFrom(utils,file_test)
importFrom(utils,read.delim)
importFrom(utils,read.table)
importFrom(utils,sessionInfo)
importFrom(utils,hasName)
importFrom(utils,head)
importFrom(utils,tail)
importFrom(utils,write.table)
99 changes: 0 additions & 99 deletions R/auto_commit.R

This file was deleted.

23 changes: 0 additions & 23 deletions R/check_git_repo.R

This file was deleted.

23 changes: 23 additions & 0 deletions R/connect_result.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,26 @@ connect_result <- function(username, password, develop = TRUE){
connect_nbn <- function(){
odbcDriverConnect(connection = nbn.dsn)
}

#' connect to the unit test database
#' @inheritParams dplyr::src_postgres
#' @export
#' @importFrom dplyr src_postgres
connect_ut_db <- function(
host = "localhost",
dbname = "n2kunittest",
user = "unittest_analysis",
password = "unittest",
port = 5432,
...
){
# nocov start
src_postgres(
host = host,
dbname = dbname,
user = user,
password = password,
...
)
# nocov end
}
2 changes: 1 addition & 1 deletion R/cut_date.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @export
#' @importFrom plyr ddply
#' @importFrom lubridate year is.Date is.POSIXt
#' @importFrom utils tail
#' @importFrom utils tail head
#' @examples
#' x <- as.POSIXct(
#' c("2015-01-01", "2014-01-02", "2013-01-03", "2012-01-31", "2011-02-01", "2012-12-31")
Expand Down
Loading