diff --git a/NAMESPACE b/NAMESPACE index 26d4292..f644c44 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -61,6 +61,7 @@ export(index_embed) export(is_any_class) export(is_consecutive) export(is_datetime) +export(is_identical_to_previous) export(is_valid_redcap_url) export(is_valid_token) export(launch_FreesearchR) diff --git a/R/plot_box.R b/R/plot_box.R index 45b4886..5a830d1 100644 --- a/R/plot_box.R +++ b/R/plot_box.R @@ -39,6 +39,7 @@ plot_box <- function(data, pri, sec, ter = NULL) { #' @export #' #' @examples +#' mtcars |> plot_box_single("mpg") #' mtcars |> plot_box_single("mpg","cyl") plot_box_single <- function(data, pri, sec=NULL, seed = 2103) { set.seed(seed) diff --git a/README.md b/README.md index ffa716b..1711fb3 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,13 @@ launch_FreesearchR() ## Code of Conduct Please note that the ***FreesearchR*** project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + +## Acknowledgements + +Like any other project, this project was never possible without the great work of others. These are some of the sources and packages I have used: + +- The ***FreesearchR*** app is build with [Shiny](https://shiny.posit.co/) and based on (*R*)[https://www.r-project.org/]. + +- [gtsummary](https://www.danieldsjoberg.com/gtsummary/): superb and flexible way to create publication-ready analytical and summary tables. + +- [dreamRs](https://github.com/dreamRs): maintainers of a broad selection of great extensions and tools for [Shiny](https://shiny.posit.co/). diff --git a/_pkgdown.yml b/_pkgdown.yml index bc78e97..2f3350a 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -13,8 +13,8 @@ template: navbar: bg: primary structure: - left: [intro, reference, roadmap, q_a, news] - right: [search, github] + left: [intro, reference, articles, roadmap, q_a, news] + right: [search, github, lightswitch] components: roadmap: text: Roadmap diff --git a/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf b/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf index 464b7ee..7ea291b 100644 --- a/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf +++ b/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf @@ -5,6 +5,6 @@ account: agdamsbo server: shinyapps.io hostUrl: https://api.shinyapps.io/v1 appId: 13611288 -bundleId: 10119038 +bundleId: 10156735 url: https://agdamsbo.shinyapps.io/freesearcheR/ version: 1 diff --git a/inst/apps/FreesearchR/ui.R b/inst/apps/FreesearchR/ui.R index 2b74c8f..6fb9b0d 100644 --- a/inst/apps/FreesearchR/ui.R +++ b/inst/apps/FreesearchR/ui.R @@ -162,7 +162,7 @@ ui_elements <- list( shiny::uiOutput(outputId = "column_filter"), shiny::helpText("Variable ", tags$a( "data type", - href = "https://agdamsbo.github.io/FreesearchR/articles/FreesearchR.html", + href = "https://agdamsbo.github.io/FreesearchR/articles/data-types.html", target = "_blank", rel = "noopener noreferrer" ), " filtering."), diff --git a/man/factorize.Rd b/man/factorize.Rd index 1ad79ca..e09eb70 100644 --- a/man/factorize.Rd +++ b/man/factorize.Rd @@ -18,5 +18,5 @@ data.frame Factorize variables in data.frame } \examples{ -factorize(mtcars,names(mtcars)) +factorize(mtcars, names(mtcars)) } diff --git a/man/is_identical_to_previous.Rd b/man/is_identical_to_previous.Rd new file mode 100644 index 0000000..73e4bdf --- /dev/null +++ b/man/is_identical_to_previous.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{is_identical_to_previous} +\alias{is_identical_to_previous} +\title{Test if element is identical to the previous} +\usage{ +is_identical_to_previous(data, no.name = TRUE) +} +\arguments{ +\item{data}{data. vector, data.frame or list} + +\item{no.name}{logical to remove names attribute before testing} +} +\value{ +logical vector +} +\description{ +Test if element is identical to the previous +} +\examples{ +c(1, 1, 2, 3, 3, 2, 4, 4) |> is_identical_to_previous() +mtcars[c(1, 1, 2, 3, 3, 2, 4, 4)] |> is_identical_to_previous() +list(1, 1, list(2), "A", "a", "a") |> is_identical_to_previous() +} diff --git a/man/remove_empty_attr.Rd b/man/remove_empty_attr.Rd index 6815568..412c36d 100644 --- a/man/remove_empty_attr.Rd +++ b/man/remove_empty_attr.Rd @@ -16,11 +16,15 @@ data of same class as input Remove empty/NA attributes } \examples{ -ds <- mtcars |> lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> dplyr::bind_cols() +ds <- mtcars |> + lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> + dplyr::bind_cols() ds |> remove_empty_attr() |> str() - mtcars |> lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> remove_empty_attr() |> +mtcars |> + lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> + remove_empty_attr() |> str() } diff --git a/man/subset_types.Rd b/man/subset_types.Rd index c1a7ef9..61fced5 100644 --- a/man/subset_types.Rd +++ b/man/subset_types.Rd @@ -21,6 +21,6 @@ Easily subset by data type function } \examples{ default_parsing(mtcars) |> subset_types("ordinal") -default_parsing(mtcars) |> subset_types(c("dichotomous", "ordinal", "categorical")) +default_parsing(mtcars) |> subset_types(c("dichotomous", "categorical")) #' default_parsing(mtcars) |> subset_types("factor",class) } diff --git a/vignettes/FreesearchR.Rmd b/vignettes/FreesearchR.Rmd index 21ff9f0..80ee9fd 100644 --- a/vignettes/FreesearchR.Rmd +++ b/vignettes/FreesearchR.Rmd @@ -67,6 +67,12 @@ This is the panel to get a good overview of your data, check data is classed and ### Summary +Here, the data variables can be inspected with a simple visualisation and a few key measures. Also, data filtering is available at two levels: + + - Data type filtering allows to filter by variable [data type]() + + - Observations level filtering allow to filter data by variable + ### Modify