Skip to content

Commit

Permalink
update news
Browse files Browse the repository at this point in the history
  • Loading branch information
randrescastaneda committed Mar 29, 2024
1 parent de78856 commit 7fca0f5
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 24 deletions.
21 changes: 18 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# joyn (development version)
# joyn 0.2.0

# joyn 0.1.6
## Breaking changes

# joyn 0.1.5
* Function `joyn::merge()` was replaced by `joyn::joyn()`. This is now the main function of the `joyn` package.

* Arguments `allow.cartesian`, `yvars`, and `keep_y_in_x` have been deprecated. The latter two have been replaced by `y_vars_to_keep` and `keep_common_vars`, respectively. The new argument names bring more clarity about what they arguments do.

## New features

* New function `joyn::merge()` works as a mask for the `base::merge()` or `data.table::merge.data.table()`. `joyn::merge()` has the same features as the previous two, but includes the features of `joyn::joyn()`.

* Messages style have been improved and categorize. See [message vignette](https://randrescastaneda.github.io/joyn/articles/messages.html) for more information.

* New functions to mimic [dplyr joins](https://dplyr.tidyverse.org/reference/mutate-joins.html). The `joyn` variants have all the features for `joyn::joyn()` but lack some of the most advance features of `dplyr` joins like [`joyn::join_by()`](https://dplyr.tidyverse.org/reference/join_by.html)


## Minor improvements and fixes

* Minor inconsistency bugs were fixed.

# joyn 0.1.4
* update_NAs now could be FALSE even if update_values is TRUE
Expand Down
30 changes: 19 additions & 11 deletions R/info_display.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
#' @param msg_type character: one or more of the following:
#' `r cli::format_inline("{.or {c('all', 'basic', type_choices())}}")`
#' @param msg character vector to be parsed to [cli::cli_abort()]. Default is
#' NULL. It only works if `"err" %in% msg_type`
#' NULL. It only works if `"err" %in% msg_type`. This is an internal argument.
#'
#' @family messages
#'
#' @return returns data frame with message invisibly. print message in console
#' @export
#'
#' @examples
#' # Storing msg with msg_type "info"
#' joyn:::store_msg("info",
#' ok = cli::symbol$tick, " ",
#' pale = "This is an info message")
#'
#' # Storing msg with msg_type "warn"
#' joyn:::store_msg("warn",
#' err = cli::symbol$cross, " ",
#' note = "This is a warning message")
#' library(data.table)
#' x1 = data.table(id = c(1L, 1L, 2L, 3L, NA_integer_),
#' t = c(1L, 2L, 1L, 2L, NA_integer_),
#' x = 11:15)
#'
#' y1 = data.table(id = 1:2,
#' y = c(11L, 15L))
#' df <- joyn(x1, y1, match_type = "m:1")
#' joyn_msg("basic")
#' joyn_msg("all")

joyn_msg <- function(msg_type = getOption("joyn.msg_type"),
msg = NULL) {

Expand Down Expand Up @@ -75,6 +73,16 @@ joyn_msg <- function(msg_type = getOption("joyn.msg_type"),
#'
#' @return current message data frame invisibly
#' @keywords internal
#' @examples
#' # Storing msg with msg_type "info"
#' joyn:::store_msg("info",
#' ok = cli::symbol$tick, " ",
#' pale = "This is an info message")
#'
#' # Storing msg with msg_type "warn"
#' joyn:::store_msg("warn",
#' err = cli::symbol$cross, " ",
#' note = "This is a warning message")
store_msg <- function(type, ...) {

# check input ----------
Expand Down
19 changes: 9 additions & 10 deletions man/joyn_msg.Rd

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

11 changes: 11 additions & 0 deletions man/store_msg.Rd

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

0 comments on commit 7fca0f5

Please sign in to comment.