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

Dev #25

Closed
wants to merge 17 commits into from
Closed

Dev #25

Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: NHSRepisodes
Title: Package Relating to Hospital Episode Intervals
Version: 0.1.0.9000
Version: 0.1.0.9001
Authors@R:
c(person(given = "Zoë",
family = "Turner",
Expand All @@ -20,12 +20,15 @@ Description: Hospital episodes can overlap or have gaps which can result in
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Imports:
data.table
Suggests:
cli,
data.table,
rlang,
tibble,
ympes
Suggests:
dplyr,
ivs,
testthat (>= 3.0.0),
tibble
Config/testthat/edition: 3
11 changes: 10 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,14 @@ S3method(merge_episodes,default)
S3method(merge_episodes,tbl_df)
export(add_parent_interval)
export(merge_episodes)
import(data.table)
importFrom(cli,cli_abort)
importFrom(data.table,data.table)
importFrom(data.table,setDF)
importFrom(data.table,setDT)
importFrom(data.table,setnames)
importFrom(data.table,setorderv)
importFrom(rlang,check_dots_empty0)
importFrom(tibble,as_tibble)
importFrom(ympes,assert_character)
importFrom(ympes,assert_scalar_character_not_na)
useDynLib(NHSRepisodes, .registration = TRUE)
24 changes: 24 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# NHSRepisodes (development version)

- **BREAKING CHANGE**: `merge_episodes` and `add_parent_interval()` now require
column names to be explicitly stated for the data frame methods. I.e. Where,
TimTaylor marked this conversation as resolved.
Show resolved Hide resolved
in the previous release, `merge_episodes(dat)` would have defaults "id",
"start" and "end" for the `id`, `start` and `end` arguments, this would now be
written as `merge_episodes(dat, "id", "start", "end")`.

- **BREAKING CHANGE**: For both `merge_episodes()` and `add_parent_interval()`,
users can now control the output column names. These arguments have been given
slightly different defaults to what was set automatically in the previous
version (hence the breaking change warning).

- More generally both the `merge_episodes()` and `add_parent_interval()`
generics have had their signatures tweaked to widen how they can be used. This
has been done with the addition of default methods that consequently mean the
following are equivalent:

```
with(dat, merge_episodes(id, start, end))
reframe(dat, merge_episodes(id, start, end))
merge_episodes(dat, "id", "start", "end")
```

- Input checking and subsequent error signalling has been improved.

# NHSRepisodes 0.1.0

This is the first (significant) release of the NHSRepisodes package. Since the
TimTaylor marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
7 changes: 0 additions & 7 deletions R/NHSRepisodes-package.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#' @keywords internal
"_PACKAGE"

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
## usethis namespace: end
NULL

#' @import data.table
#' @useDynLib NHSRepisodes, .registration = TRUE
NULL
Loading
Loading