-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from atorus-research/gh_issue_62
Move data from vignettes to package data
- Loading branch information
Showing
45 changed files
with
492 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
^Makefile$ | ||
^Jenkinsfile$ | ||
^rsconnect$ | ||
^data-raw$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,4 @@ VignetteBuilder: knitr | |
RoxygenNote: 7.2.3 | ||
RdMacros: lifecycle | ||
Config/testthat/edition: 3 | ||
LazyData: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#' ADSL Data | ||
#' | ||
#' A subset of the PHUSE Test Data Factory ADSL data set. | ||
#' | ||
#' @format A data.frame with 254 rows and 49 columns. | ||
#' | ||
#' @seealso [get_data_labels()] | ||
#' | ||
#' @source https://github.com/phuse-org/TestDataFactory | ||
#' | ||
"tplyr_adsl" | ||
|
||
|
||
#' ADAE Data | ||
#' | ||
#' A subset of the PHUSE Test Data Factory ADAE data set. | ||
#' | ||
#' @format A data.frame with 276 rows and 55 columns. | ||
#' | ||
#' @seealso [get_data_labels()] | ||
#' | ||
#' @source https://github.com/phuse-org/TestDataFactory | ||
#' | ||
"tplyr_adae" | ||
|
||
#' ADAS Data | ||
#' | ||
#' A subset of the PHUSE Test Data Factory ADAS data set. | ||
#' | ||
#' @format A data.frame with 1,040 rows and 40 columns. | ||
#' | ||
#' @seealso [get_data_labels()] | ||
#' | ||
#' @source https://github.com/phuse-org/TestDataFactory | ||
#' | ||
"tplyr_adas" | ||
|
||
#' ADLB Data | ||
#' | ||
#' A subset of the PHUSE Test Data Factory ADLB data set. | ||
#' | ||
#' @format A data.frame with 311 rows and 46 columns. | ||
#' | ||
#' @seealso [get_data_labels()] | ||
#' | ||
#' @source https://github.com/phuse-org/TestDataFactory | ||
#' | ||
"tplyr_adlb" | ||
|
||
|
||
#' Get Data Labels | ||
#' | ||
#' Get labels for data sets included in Tplyr. | ||
#' | ||
#' @param data A Tplyr data set. | ||
#' | ||
#' @return A data.frame with columns `name` and `label` containing the names and labels of each column. | ||
#' | ||
#' @export | ||
get_data_labels <- function(data) { | ||
map_dfr( | ||
names(data), | ||
function(name) { | ||
list(name = name, label = attr(data[[name]], "label")) | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## code to prepare `DATASET` dataset goes here | ||
|
||
usethis::use_data(DATASET, overwrite = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# note: adae.Rdata was copied over from vignettes/adsl.Rdata | ||
# this is a copy of the PHUSE Test Data Factory data, trimmed down for size | ||
|
||
load("data-raw/adae.Rdata") | ||
tplyr_adae <- adae | ||
usethis::use_data(tplyr_adae, overwrite = TRUE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# note: adlb.Rdata was copied over from vignettes/adsl.Rdata | ||
# this is a copy of the PHUSE Test Data Factory data, trimmed down for size | ||
|
||
load("data-raw/adas.Rdata") | ||
tplyr_adas <- adas | ||
usethis::use_data(tplyr_adas, overwrite = TRUE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# note: adlb.Rdata was copied over from vignettes/adsl.Rdata | ||
# this is a copy of the PHUSE Test Data Factory data, trimmed down for size | ||
|
||
load("data-raw/adlb.Rdata") | ||
tplyr_adlb <- adlb | ||
usethis::use_data(tplyr_adlb, overwrite = TRUE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# note: adsl.Rdata was copied over from vignettes/adsl.Rdata | ||
# this is a copy of the PHUSE Test Data Factory data, trimmed down for size | ||
|
||
load("data-raw/adsl.Rdata") | ||
tplyr_adsl <- adsl | ||
usethis::use_data(tplyr_adsl, overwrite = TRUE) |
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.