Skip to content

Commit

Permalink
Merge branch 'release-0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHeun committed Feb 14, 2019
2 parents 3bf6cd0 + fa68c0f commit dd2b627
Show file tree
Hide file tree
Showing 27 changed files with 752 additions and 1,152 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: matsindf
Type: Package
Title: Matrices in data frames
Title: Matrices in Data Frames
Version: 0.3.0
Date: 2019-01-26
Date: 2019-02-05
Authors@R: c(person("Matthew", "Heun", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7438-214X"),
email = "[email protected]"))
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# matsindf 0.3.0 (2019-01-26)
# matsindf 0.3.0 (2019-02-05)

* Address questions from CRAN:
- Title case: Matrices in Data Frames
- `\dontrun{}` --> `\donttest{}` in Roxygen examples
* Fully-qualified all function calls in `matsindf` functions.
* Now importing the `:=` and `.data` at a high level.
* Added TravisCI integration
Expand Down
4 changes: 2 additions & 2 deletions R/matsindf_apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#' matsindf_apply(DF, FUN = example_fun, a = "a", b = "b")
#' # By default, arguments to FUN come from DF
#' matsindf_apply(DF, FUN = example_fun)
#' # Matrices in data frames (matsindf)
#' # Now put some matrices in a data frame.
#' DF2 <- data.frame(a = I(list(a, a)), b = I(list(b,b)))
#' matsindf_apply(DF2, FUN = example_fun, a = "a", b = "b")
#' # All arguments to FUN are supplied by named items in .dat
Expand All @@ -88,7 +88,7 @@
#' # Note that the named arguments override the items in .dat
#' matsindf_apply(list(a = 1, b = 2, z = 10), FUN = example_fun, a = "z", b = "b")
#' # Warning is issued when an output item has same name as an input item.
#' \dontrun{matsindf_apply(list(a = 1, b = 2, c = 10), FUN = example_fun, a = "c", b = "b")}
#' matsindf_apply(list(a = 1, b = 2, c = 10), FUN = example_fun, a = "c", b = "b")
matsindf_apply <- function(.dat = NULL, FUN, ...){
if (!is.null(.dat)) {
if (!is.list(.dat)) {
Expand Down
10 changes: 5 additions & 5 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ mat_to_rowcolval <- function(.matrix, matvals = "matvals",
#' # Fails when rowtypes or coltypes not all same. In data3, column rt is not all same.
#' data4 <- data %>% bind_cols(data.frame(rt = c("Commodities", "Industries", "Commodities"),
#' ct = c("Industries", "Industries", "Industries")))
#' \dontrun{rowcolval_to_mat(data4, rownames = "rows", colnames = "cols",
#' matvals = "vals", rowtypes = "rt", coltypes = "ct")}
#' \donttest{rowcolval_to_mat(data4, rownames = "rows", colnames = "cols",
#' matvals = "vals", rowtypes = "rt", coltypes = "ct")}
rowcolval_to_mat <- function(.DF, matvals = "matvals",
rownames = "rownames", colnames = "colnames",
rowtypes = "rowtypes", coltypes = "coltypes", fill = 0){
Expand Down Expand Up @@ -229,8 +229,8 @@ rowcolval_to_mat <- function(.DF, matvals = "matvals",
#' index_column(DF, var_to_index = "var", time_var = "Year", suffix = "_ratioed")
#' index_column(DF, var_to_index = "var", time_var = "Year", indexed_var = "now.indexed")
#' index_column(DF, var_to_index = "var", time_var = "Year", index_time = 2005,
#' indexed_var = "now.indexed")
#' \dontrun{
#' indexed_var = "now.indexed")
#' \donttest{
#' DF %>%
#' ungroup() %>%
#' group_by(name, var) %>%
Expand Down Expand Up @@ -316,7 +316,7 @@ index_column <- function(.DF, var_to_index, time_var = "Year", index_time = NULL
#' df <- data.frame(a = c(1,2), b = c(3,4))
#' verify_cols_missing(df, "d") # Silent. There will be no problem adding column "d".
#' newcols <- c("c", "d", "a", "b")
#' \dontrun{verify_cols_missing(df, newcols)}
#' \donttest{verify_cols_missing(df, newcols)} # Error: a and b are already in df.
verify_cols_missing <- function(.DF, newcols){
if (!is.vector(newcols)) {
newcols <- c(newcols)
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ devtools::install_github("MatthewHeun/matsindf", build_vignettes = TRUE)

## History

The functions in this package were used in the paper
The functions in this package were used in
[Heun et al. [-@Heun:2018]](https://doi.org/10.1016/j.apenergy.2018.05.109).


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ devtools::install_github("MatthewHeun/matsindf", build_vignettes = TRUE)

## History

The functions in this package were used in the paper [Heun et al.
The functions in this package were used in [Heun et al.
(2018)](https://doi.org/10.1016/j.apenergy.2018.05.109).

## More Information
Expand Down
73 changes: 48 additions & 25 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,61 @@
## Context
`matsindf` is a new package that provides functions to work with matrices stored in data frames.

## Test environments
* local macOS X install 10.14.2 (Mojave), R3.5.2
* ubuntu 14.04.5 (on Travis CI), R3.5.2
* windows (on win-builder)
* `devtools::check_win_devel()`, R Under development (unstable) (2019-01-25 r76015)
## Test environments (7 in total)
* Local macOS X install 10.14.2 (Mojave), R3.5.2
* TRAVIS-CI ubuntu 14.04.5, R3.5.2
* Windows (on win-builder)
* `devtools::check_win_release()`, R3.5.2 (2018-12-20)
* `devtools::check_win_devel()`, R Under development (unstable) (2019-02-04 r76055)
* rhub
* `devtools::check_rhub()`
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit
* Ubuntu Linux 16.04 LTS, R-release, GCC
* Fedora Linux, R-devel, clang, gfortran

## R CMD check results
* NOTEs: 2
* The first NOTE states (correctly) that `matsindf` is a new submission to CRAN.
* The second NOTE occurs only in rhub's "Ubuntu Linux 16.04 LTS, R-release, GCC" environment.
* The note states that `Author field differs from that derived from Authors@R`.
* But my `DESCRIPTION` file contains only an `Authors@R` field, not an `Author` field.
* So this NOTE is surprising, and it occurs in only one of six test environments.
* WARNING: 1
* The single WARNING occurs only in rhub's "Fedora Linux, R-devel, clang, gfortran" environment.
* No WARNINGs occur in any other environments,
including the R-devel environment on win-builder (`devtools::check_win_devel()`).
* The warning on rhub's "Fedora Linux, R-devel, clang, gfortran" environment appears to be connected to
an installation failure for the helvetica font.
* The warning contains the text
* `Error: processing vignette 'matsindf.Rmd' failed with diagnostics:`
* `X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 5 at size 11 could not be loaded`
* I don't think this Error is the fault of the `matsindf` package.
* Rather, the Error is unique to rhub's "Fedora Linux, R-devel, clang, gfortran" environment
and appear to be the result of a font installation failure in that environment.
* ERRORs: 0
* No errors occur.
* Local macOS X install 10.14.2 (Mojave), R3.5.2
* 0 ERRORs
* 0 WARNINGs
* 0 NOTEs
* TRAVIS-CI ubuntu 14.04.5, R3.5.2
* 0 ERRORs
* 0 WARNINGs
* 0 NOTEs
* Windows (on win-builder)
* `devtools::check_win_release()`, R3.5.2 (2018-12-20)
* 0 ERRORs
* 0 WARNINGs
* 1 NOTE: New submission (as expected)
* `devtools::check_win_devel()`, R Under development (unstable) (2019-02-04 r76055)
* 2 ERRORs
* The 2 ERRORs are test failures that occur only in this R-devel environment.
* Both ERRORs are test failures of the type "target is logical, current is character"
* I don't think these ERRORs are the fault of the `matsindf` package.
* 0 WARNINGs
* 1 NOTE: New submission (as expected)
* rhub
* `devtools::check_rhub()`
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit
* 0 ERRORs
* 0 WARNINGs
* 1 NOTE: New submission (as expected)
* Ubuntu Linux 16.04 LTS, R-release, GCC
* 0 ERRORs
* 0 WARNINGs
* 2 NOTEs
* The first note identifies `matsindf` as a new submission (as expected).
* The second note says `Author field differs from that derived from Authors@R`.
* This note occurs in only this environment.
* I do not have an `Author` field in the DESCRIPTION file.
* I don't think this NOTE is the fault of the `matsindf` package.
* Fedora Linux, R-devel, clang, gfortran
* 0 ERRORs
* 1 WARNING
* This WARNING occurs only in this environment and only when building a vignette.
* The WARNING states `X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 5 at size 11 could not be loaded`
* I don't think this WARNING is the fault of the `matsindf` package.
Rather, the warning appears to be a font issue that is unique to this R-devel environment.

## Downstream dependencies
There are currently no downstream dependencies for `matsindf`.
Loading

0 comments on commit dd2b627

Please sign in to comment.