diff --git a/DESCRIPTION b/DESCRIPTION index 17e8434d..450a8146 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ProjectTemplate Type: Package Title: Automates the Creation of New Statistical Analysis Projects -Version: 0.8.2 -Date: 2018-04-20 +Version: 0.9.0 +Date: 2019-02-26 Authors@R: c( person("Aleksandar", "Blagotic", role = "ctb"), person("Diego", "Valle-Jones", role = "ctb"), person("Jeffrey", "Breen", role = "ctb"), @@ -23,6 +23,7 @@ Description: Provides functions to License: GPL-3 | file LICENSE LazyLoad: yes Roxygen: list(wrap = FALSE) +Encoding: UTF-8 Depends: R (>= 2.7) Suggests: @@ -108,4 +109,4 @@ Collate: 'xls.reader.R' 'xlsx.reader.R' 'xport.reader.R' -RoxygenNote: 6.0.1 +RoxygenNote: 6.1.1 diff --git a/NAMESPACE b/NAMESPACE index 884731b5..930af1cb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -29,5 +29,6 @@ importFrom(utils,download.file) importFrom(utils,install.packages) importFrom(utils,modifyList) importFrom(utils,read.csv) +importFrom(utils,read.csv2) importFrom(utils,read.table) importFrom(utils,unzip) diff --git a/NEWS.md b/NEWS.md index 7d414b98..4fa62ee1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,27 @@ # ProjectTemplate 0.8.2 (2018-04-20) +0.9.0 (2019-02-26) + +Features +-------- +* New for R 3.6, support for staged install (#291) +* Define default table types using config var `tables_type` (#274) +* Support for `feather` files (#239) +* Migration from `csv2.reader` to `read.csv2` (#195) +* Supports `rstudio.project` files (#201) + +Documentation +------------- +* Link website documentation current release to News.md +* Added file types to `dat` directory `README` (#268) +* Internal functions are now documenter (#243) + +Internal +-------- +* `data_ignore` applies to `cache` vars (#290) +* More informative error messages if not in a ProjectTemplate Directory (#287) +* `migrate_project()` creates missing `cache` directory (#275) + 0.8.2 (2018-04-20) Features @@ -188,7 +210,7 @@ v0.4-4 (2013-08-11) * Fix CRAN checks (@krlmlr). * project.info is now an active binding to avoid writing to the global environment (@krlmlr). -* Reenabled xlsx.reader (@krlmlr). +* Re-enabled xlsx.reader (@krlmlr). * Added JDBC support to sql.reader (@joshbode, #12). * Various MySQL improvements (@cortex, #10). * Fix "Argument port must be an integer value" when using port number for mysql diff --git a/R/clear.R b/R/clear.R index 854aaefd..2e852996 100644 --- a/R/clear.R +++ b/R/clear.R @@ -10,7 +10,7 @@ #' @param keep A character vector of variables that should remain in the global #' environment #' @param force If \code{TRUE}, then variables will be deleted even if -#' specifed in \code{keep} or \code{config$sticky_variables} +#' specified in \code{keep} or \code{config$sticky_variables} #' #' @return The variables kept and removed are reported #' diff --git a/R/csv2.reader.R b/R/csv2.reader.R index bd792da8..c56797b4 100644 --- a/R/csv2.reader.R +++ b/R/csv2.reader.R @@ -3,7 +3,7 @@ #' In May 2018, the default behaviour of the reader for .csv2 files changed to use R's read.csv2(), #' where the field separator is assumed to be ';' and the decimal separator to be ','. #' -#' @importFrom utils read.csv +#' @importFrom utils read.csv2 #' @importFrom utils unzip csv2.reader <- function(data.file, filename, variable.name) { diff --git a/R/list.data.R b/R/list.data.R index 3469f5ec..37c2b8dc 100644 --- a/R/list.data.R +++ b/R/list.data.R @@ -32,7 +32,7 @@ #' } #' #' * Note that some readers return more than one variable, usually with the -#' listed variablename as prefix. This is true for for example the +#' listed variable name as prefix. This is true for for example the #' \code{xls.reader} and \code{xlsx.reader}. #' #' @export diff --git a/R/require.package.R b/R/require.package.R index 3a11af7b..e9879f9a 100644 --- a/R/require.package.R +++ b/R/require.package.R @@ -54,7 +54,7 @@ require.package <- function(package.name, attach = TRUE) #' #' @keywords internal #' -#' @return Boolean indicating whether the package was succesfully loaded +#' @return Boolean indicating whether the package was successfully loaded #' #' @rdname internal.attach.or.add.namespace .attach.or.add.namespace <- function(package.name, attach) { diff --git a/cran-comments.md b/cran-comments.md index 6e5b523f..398bd029 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Test environments -* local Ubuntu install, R 3.3.1 -* ubuntu 12.04 (on travis-ci), R 3.3.1 +* local MacOSX install, R-devel 3.6 +* ubuntu 12.04 (on travis-ci), R 3.5.2 * win-builder (devel and release) ## R CMD check results diff --git a/docs/changes.markdown b/docs/changes.markdown index e11ecae9..a7f8e599 100644 --- a/docs/changes.markdown +++ b/docs/changes.markdown @@ -7,6 +7,28 @@ The raw ProjectTemplate source code is always the place to go for ground truth. The list of changes below covers all releases up to and including v0.8.2. It is not necessarily exhaustive. +#### 0.9.0 (2019-02-26) + +###### Features + +* New for R 3.6, support for staged install (#291) +* Define default table types using config var `tables_type` (#274) +* Support for `feather` files (#239) +* Migration from `csv2.reader` to `read.csv2` (#195) +* Supports `rstudio.project` files (#201) + +##### Documentation + +* Link website documentation current release to News.md +* Added file types to `dat` directory `README` (#268) +* Internal functions are now documenter (#243) + +##### Internal + +* `data_ignore` applies to `cache` vars (#290) +* More informative error messages if not in a ProjectTemplate Directory (#287) +* `migrate_project()` creates missing `cache` directory (#275) + #### 0.8.2 (2018-04-20) ##### Features diff --git a/docs/configuring.markdown b/docs/configuring.markdown index fb3bfcdf..12b1236c 100644 --- a/docs/configuring.markdown +++ b/docs/configuring.markdown @@ -23,7 +23,7 @@ The current `ProjectTemplate` configuration settings exist in the `config/global * `load_libraries`: This can be set to 'on' or 'off'. If `load_libraries` is on, the system will load all of the R packages listed in the `libraries` field described below. By default, `load_libraries` is off. * `libraries`: This is a comma separated list of all the R packages that the user wants to automatically load when `load.project()` is called. These packages must already be installed before calling `load.project()`. By default, the reshape2, plyr, tidyverse, stringr and lubridate packages are included in this list. * `as_factors`: This can be set to 'on' or 'off'. If `as_factors` is on, the system will convert every character vector into a factor when creating data frames; most importantly, this automatic conversion occurs when reading in data automatically. If 'off', character vectors will remain character vectors. By default, `as_factors` is on. -* `data_tables`: This can be set to 'on' or 'off'. If `data_tables` is on, the system will convert every data set loaded from the `data` directory into a `data.table`. By default, `data_tables` is off. +* `tables_type`: This is the format for default tables. Values can be 'tibble' (default), 'data_table', or 'data_frame' * `attach_internal_libraries`: This can be set to 'on' or 'off'. If `attach_internal_libraries` is on, then every time a new package is loaded into memory during `load.project()` a warning will be displayed informing that has happened. By default, `attach_internal_libraries` is off. * `cache_loaded_data`: This can be set to 'on' or 'off'. If `cache_loaded_data` is on, then data loaded from the `data` directory during `load.project()` will be automatically cached (so it won't need to be reloaded next time `load.project()` is called). By default, `cache_loaded_data` is on for newly created projects. Existing projects created without this configuration setting will default to off. Similarly, when `migrate.project()` is called in those cases, the default will be off. * `sticky_variables`: This is a comma separated list of any project-specific variables that should remain in the global environment after a `clear()` command. This can be used to clear the global environment, but keep any large datasets in place so they are not unnecessarily re-generated during `load.project()`. Note that any this will be over-ridden if the `force=TRUE` parameter is passed to `clear()`. By default, `sticky_variables` is NONE diff --git a/inst/defaults/templates/full/config/global.dcf b/inst/defaults/templates/full/config/global.dcf index 19616a7a..540cab28 100644 --- a/inst/defaults/templates/full/config/global.dcf +++ b/inst/defaults/templates/full/config/global.dcf @@ -1,4 +1,4 @@ -version: 0.8.2 +version: 0.9.0 data_loading: TRUE data_loading_header: TRUE data_ignore: diff --git a/inst/defaults/templates/minimal/config/global.dcf b/inst/defaults/templates/minimal/config/global.dcf index 19616a7a..540cab28 100644 --- a/inst/defaults/templates/minimal/config/global.dcf +++ b/inst/defaults/templates/minimal/config/global.dcf @@ -1,4 +1,4 @@ -version: 0.8.2 +version: 0.9.0 data_loading: TRUE data_loading_header: TRUE data_ignore: diff --git a/man/clear.Rd b/man/clear.Rd index f9792759..2ae2fb2d 100644 --- a/man/clear.Rd +++ b/man/clear.Rd @@ -15,7 +15,7 @@ those in \code{keep} will be deleted. This includes items beginning with \code{ environment} \item{force}{If \code{TRUE}, then variables will be deleted even if -specifed in \code{keep} or \code{config$sticky_variables}} +specified in \code{keep} or \code{config$sticky_variables}} } \value{ The variables kept and removed are reported diff --git a/man/create.project.Rd b/man/create.project.Rd index f5a3d454..c7e4a948 100644 --- a/man/create.project.Rd +++ b/man/create.project.Rd @@ -5,8 +5,8 @@ \title{Create a new project.} \usage{ create.project(project.name = "new-project", template = "full", - dump = FALSE, merge.strategy = c("require.empty", "allow.non.conflict"), - rstudio.project = FALSE) + dump = FALSE, merge.strategy = c("require.empty", + "allow.non.conflict"), rstudio.project = FALSE) } \arguments{ \item{project.name}{A character vector containing the name for this new diff --git a/man/internal.attach.or.add.namespace.Rd b/man/internal.attach.or.add.namespace.Rd index 9a505a7d..11760758 100644 --- a/man/internal.attach.or.add.namespace.Rd +++ b/man/internal.attach.or.add.namespace.Rd @@ -12,7 +12,7 @@ \item{attach}{boolean indicating whether to attach the package in the global namespace} } \value{ -Boolean indicating whether the package was succesfully loaded +Boolean indicating whether the package was successfully loaded } \description{ Internal method to attach a package or only add the namespace. diff --git a/man/internal.list.data.Rd b/man/internal.list.data.Rd index cbad0e8d..6a3f546f 100644 --- a/man/internal.list.data.Rd +++ b/man/internal.list.data.Rd @@ -41,7 +41,7 @@ The returned data.frame contains the following variables, with one } * Note that some readers return more than one variable, usually with the - listed variablename as prefix. This is true for for example the + listed variable name as prefix. This is true for for example the \code{xls.reader} and \code{xlsx.reader}. } \keyword{internal} diff --git a/man/list.data.Rd b/man/list.data.Rd index bdc3ce79..a8e604b3 100644 --- a/man/list.data.Rd +++ b/man/list.data.Rd @@ -42,7 +42,7 @@ The returned data.frame contains the following variables, with one } * Note that some readers return more than one variable, usually with the - listed variablename as prefix. This is true for for example the + listed variable name as prefix. This is true for for example the \code{xls.reader} and \code{xlsx.reader}. } \examples{ diff --git a/man/project.config.Rd b/man/project.config.Rd index afbe56e9..4b5b6473 100644 --- a/man/project.config.Rd +++ b/man/project.config.Rd @@ -22,46 +22,46 @@ configuration. The options that can be configured in the \code{config/global.dcf} are shown below \tabular{ll}{ - \code{data_loading} \tab This can be set to 'on' or 'off'. If data_loading is on, + \code{data_loading} \tab This can be set to TRUE or FALSE. If data_loading is on, the system will load data from both the cache and data directories with cache taking precedence in the case of name conflict. \cr - \code{data_loading_header} \tab This can be set to 'on' or 'off'. If data_loading_header is on, + \code{data_loading_header} \tab This can be set to TRUE or FALSE. If data_loading_header is on, the system will load text data files, such as CSV, TSV, or XLSX, treating the first row as header. \cr \code{data_ignore} \tab A comma separated list of files to be ignored when importing from the \code{data/} directory. Regular expressions can be used but should be delimited (on both sides) by \code{/}. Note that filenames and filepaths should never begin with a \code{/}, entire directories under \code{data/} can be ignored by adding a trailing \code{/}. \cr - \code{cache_loading} \tab This can be set to 'on' or 'off'. If cache_loading is on, + \code{cache_loading} \tab This can be set to TRUE or FALSE. If cache_loading is on, the system will load data from the cache directory before any attempt to load from the data directory. \cr - \code{recursive_loading} \tab This can be set to 'on' or 'off'. If recursive_loading + \code{recursive_loading} \tab This can be set to TRUE or FALSE. If recursive_loading is on, the system will load data from the data directory and all its sub directories recursively. \cr - \code{munging} \tab This can be set to 'on' or 'off'. If munging is on, the system + \code{munging} \tab This can be set to TRUE or FALSE. If munging is on, the system will execute the files in the munge directory sequentially using the order - implied by the sort() function. If munging is off, none of the files in the + implied by the sort() function. If munging is FALSE, none of the files in the munge directory will be executed. \cr - \code{logging} \tab This can be set to 'on' or 'off'. If logging is on, a logger + \code{logging} \tab This can be set to TRUE or FALSE. If logging is on, a logger object using the log4r package is automatically created when you run load.project(). This logger will write to the logs directory. \cr \code{logging_level} \tab The value of logging_level is passed to a logger object using the log4r package during logging when when you run load.project(). \cr - \code{load_libraries} \tab This can be set to 'on' or 'off'. If load_libraries is on, + \code{load_libraries} \tab This can be set to TRUE or FALSE. If load_libraries is on, the system will load all of the R packages listed in the libraries field described below. \cr \code{libraries} \tab This is a comma separated list of all the R packages that the user wants to automatically load when load.project() is called. These packages must already be installed before calling load.project(). \cr - \code{as_factors} \tab This can be set to 'on' or 'off'. If as_factors is on, the system + \code{as_factors} \tab This can be set to TRUE or FALSE. If as_factors is on, the system will convert every character vector into a factor when creating data frames; most importantly, this automatic conversion occurs when reading in data automatically. - If 'off', character vectors will remain character vectors. \cr - \code{data_tables} \tab This can be set to 'on' or 'off'. If data_tables is on, the -system will convert every data set loaded from the data directory into a data.table. \cr - \code{attach_internal_libraries} \tab This can be set to 'on' or 'off'. If + If FALSE, character vectors will remain character vectors. \cr + \code{tables_type} \tab This is the format for default tables. Values can be 'tibble' (default), +'data_table', or 'data_frame' \cr + \code{attach_internal_libraries} \tab This can be set to TRUE or FALSE. If attach_internal_libraries is on, then every time a new package is loaded into memory during load.project() a warning will be displayed informing that has happened. \cr - \code{cache_loaded_data} \tab This can be set to 'on' or 'off'. If cache_loaded_data is + \code{cache_loaded_data} \tab This can be set to TRUE or FALSE. If cache_loaded_data is on, then data loaded from the data directory during load.project() will be automatically cached (so it won't need to be reloaded next time load.project() is called). \cr