From a59b980a950ff21429a599da28a943c43ad5f4d2 Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Wed, 23 Apr 2025 14:26:18 +0200 Subject: [PATCH] moving notes on visuals --- inst/apps/FreesearchR/www/notes_visuals.html | 413 ------------------- inst/apps/FreesearchR/www/notes_visuals.md | 11 - vignettes/visuals.Rmd | 55 +++ 3 files changed, 55 insertions(+), 424 deletions(-) delete mode 100644 inst/apps/FreesearchR/www/notes_visuals.html delete mode 100644 inst/apps/FreesearchR/www/notes_visuals.md create mode 100644 vignettes/visuals.Rmd diff --git a/inst/apps/FreesearchR/www/notes_visuals.html b/inst/apps/FreesearchR/www/notes_visuals.html deleted file mode 100644 index b5f8545..0000000 --- a/inst/apps/FreesearchR/www/notes_visuals.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - -notes_visuals - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Basic visualisations

-

This section on plotting data is kept very minimal, and includes only -the most common plot types for clinical projects.

-

If you want to go further, have a look at these sites with -suggestions and sample code for data plotting:

- -
- - - - -
- - - - - - - - - - - - - - - diff --git a/inst/apps/FreesearchR/www/notes_visuals.md b/inst/apps/FreesearchR/www/notes_visuals.md deleted file mode 100644 index 58e3a75..0000000 --- a/inst/apps/FreesearchR/www/notes_visuals.md +++ /dev/null @@ -1,11 +0,0 @@ -# Basic visualisations - -The goal of ***FreesearchR*** is to keep things simple. Visuals can get very complicated. We provide a selection of plots, that helps visualise typical clinical and will be enough for most use cases, and for publishing to most journals. - -If you want to go further, have a look at these sites with suggestions and sample code for data plotting: - -- [*R* Charts](https://r-charts.com/): Extensive gallery with great plots - -- [*R* Graph gallery](https://r-graph-gallery.com/): Another gallery with great graphs - -- [graphics principles](https://graphicsprinciples.github.io/): Easy to follow recommendations for clear visuals. diff --git a/vignettes/visuals.Rmd b/vignettes/visuals.Rmd new file mode 100644 index 0000000..830d16e --- /dev/null +++ b/vignettes/visuals.Rmd @@ -0,0 +1,55 @@ +--- +title: "On visuals" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{visuals} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +options(rmarkdown.html_vignette.check_title = FALSE) +``` + +```{r setup} +library(FreesearchR) +``` + +## Basic visualisations + +The goal of ***FreesearchR*** is to keep things simple. Visuals can get very complicated. We provide a selection of plots, that helps visualise typical clinical and will be enough for most use cases, and for publishing to most journals. + +If you want to go further, have a look at these sites with suggestions and sample code for data plotting: + +- [*R* Charts](https://r-charts.com/): Extensive gallery with great plots + +- [*R* Graph gallery](https://r-graph-gallery.com/): Another gallery with great graphs + +- [graphics principles](https://graphicsprinciples.github.io/): Easy to follow recommendations for clear visuals. + + +### Available plots + +Below are the available plot types listed. + +```{r echo = FALSE, eval = TRUE} +c("continuous", "dichotomous", "categorical") |> + lapply(\(.x){ + dplyr::bind_cols( + dplyr::tibble("Data type"=.x), + supported_plots() |> + lapply(\(.y){ + if (.x %in% .y$primary.type){ + .y[c("descr","note")]|> dplyr::bind_cols() + } +})|> + dplyr::bind_rows() |> + setNames(c("Plot type","Description"))) + }) |> + dplyr::bind_rows() |> + knitr::kable() +```