Skip to content

Commit

Permalink
🔖 bump minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Cazelles committed Jun 5, 2020
1 parent 7ac3653 commit 049700c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: inSilecoMisc
Title: inSileco Miscellaneous Functions
Date: 2020-04-10
Version: 0.4.0.9000
Date: 2020-06-05
Version: 0.5.0
Authors@R: c(
person("Kevin", "Cazelles", email = "kevin.cazelles@gmail.com", comment = c(ORCID = "0000-0001-6619-9874"), role = c("aut", "cre")),
person("David", "Beauchesne", role = c("aut")),
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# inSilecoMisc (devel)
# inSilecoMisc 0.5.0

* `dfTemplateMatch()` gains one argument `order` to order column of the output
dataframe according to the template.
* `dfTemplateMatch()` gains an argument `order` to order column of the output
data frame according to the template (see #20).
* add `stopwatch()` and `timer()`.
* add `seqRg()` that generates a regular sequence based on the range of a vector.
* add `seqRow()` and ``seqCol()` that generate a regular sequences based on the number of rows and columns (respectively) of a data frame (or a matrix).
Expand Down
8 changes: 4 additions & 4 deletions R/dfTemplate.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#' By default, the class is determined by `fill`.
#' @param fill character or number used to fill out the columns. Default is `NA`.
#' @param x a data frame.
#' @param y data frame or a vector of strings that includes part of or all of
#'the column names of the data frame to be output.
#' @param y a data frame or a vector of strings use to specifies column names to be included in the data frame.
#' @param yonly a logical. Should only `y` (or the `names(y)`) be used for the
#' data frame to be returned? Default is set to `FALSE` meaning that both the
#' names of `x` and the names of `y` are used.
Expand All @@ -35,9 +34,10 @@
#' dfTemplate(5, 2)
#' dfTemplate(5, 2, col_classes = "character")
#' dfA <- data.frame(col1 = c(1, 2), col2 = LETTERS[1:2])
#' dfB <- data.frame(col4 = c(1, 2), col2 = LETTERS[1:2])
#' dfTemplateMatch(dfA, c("col4", "col2"))
#' dfTemplateMatch(dfA, c("col4", "col2"), yonly = TRUE)
#' dfTemplateMatch(dfA, c("col4", "col2"), yonly = TRUE, order = TRUE)
#' dfTemplateMatch(dfA, dfB, yonly = TRUE, order = TRUE)

dfTemplate <- function(cols, nrows = 1, col_classes = NULL, fill = NA) {

Expand Down Expand Up @@ -72,7 +72,7 @@ dfTemplate <- function(cols, nrows = 1, col_classes = NULL, fill = NA) {
}


#' @describeIn dfTemplate Returns a data frame that matches names in `y`.
#' @describeIn dfTemplate Returns a data frame that includes all columns specifies in `y`.
#' @export
dfTemplateMatch <- function(x, y, yonly = FALSE, order = FALSE, ...) {

Expand Down
8 changes: 4 additions & 4 deletions man/dfTemplate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 049700c

Please sign in to comment.