From 559f89503524a37b3ca968ecf4d527686872ae7a Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 24 Dec 2024 14:47:34 +1000 Subject: [PATCH] Add CRAN link --- .devcontainer/Dockerfile | 2 +- README.Rmd | 21 ++++++++++++--- README.md | 45 +++++++++++++++++++++---------- man/figures/example-hlgrep-2.svg | 2 +- man/figures/example-strdiff-4.svg | 4 +-- 5 files changed, 53 insertions(+), 21 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6345793..4fe23d8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,4 +15,4 @@ RUN install2.r --error --skipinstalled -n -1 \ # Install Python packages COPY requirements.txt /tmp/pip-tmp/ -RUN python3 -m pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt +RUN python3 -m pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt --break-system-packages diff --git a/README.Rmd b/README.Rmd index 6bd7776..0987934 100644 --- a/README.Rmd +++ b/README.Rmd @@ -61,6 +61,7 @@ image_read("man/figures/logo.png") ![](https://img.shields.io/badge/cool-useless-green.svg) [![R-CMD-check](https://github.com/coolbutuseless/emphatic/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coolbutuseless/emphatic/actions/workflows/R-CMD-check.yaml) +[![CRAN](https://www.r-pkg.org/badges/version/emphatic)](https://CRAN.R-project.org/package=emphatic) `{emphatic}` is a tool for exploratory analysis of tabular data. It allows the user @@ -103,15 +104,29 @@ This highlighting works * Conversion to the correct output format is performed automatically when knitting an Rmarkdown or Quarto document. -#### Installation +## Installation -You can install from [GitHub](https://github.com/coolbutuseless/emphatic) with: +This package can be installed from CRAN ``` r -# install.packages('remotes') +install.packages('emphatic') +``` + +You can install the latest development version from +[GitHub](https://github.com/coolbutuseless/emphatic) with: + +``` r +# install.package('remotes') remotes::install_github('coolbutuseless/emphatic') ``` +Pre-built source/binary versions can also be installed from +[R-universe](https://r-universe.dev) + +``` r +install.packages('emphatic', repos = c('https://coolbutuseless.r-universe.dev', 'https://cloud.r-project.org')) +``` + ## Highlighting of data.frames with `hl()` diff --git a/README.md b/README.md index f6b733d..60f9d80 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ ![](https://img.shields.io/badge/cool-useless-green.svg) [![R-CMD-check](https://github.com/coolbutuseless/emphatic/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coolbutuseless/emphatic/actions/workflows/R-CMD-check.yaml) +[![CRAN](https://www.r-pkg.org/badges/version/emphatic)](https://CRAN.R-project.org/package=emphatic) `{emphatic}` is a tool for exploratory analysis of tabular data. It @@ -36,9 +37,12 @@ This highlighting works - rendered as multiple frames to **animated SVG**
+ + Click here to show/hide gif demo +
@@ -56,16 +60,29 @@ Click here to show/hide gif demo - Conversion to the correct output format is performed automatically when knitting an Rmarkdown or Quarto document. -#### Installation +## Installation -You can install from +This package can be installed from CRAN + +``` r +install.packages('emphatic') +``` + +You can install the latest development version from [GitHub](https://github.com/coolbutuseless/emphatic) with: ``` r -# install.packages('remotes') +# install.package('remotes') remotes::install_github('coolbutuseless/emphatic') ``` +Pre-built source/binary versions can also be installed from +[R-universe](https://r-universe.dev) + +``` r +install.packages('emphatic', repos = c('https://coolbutuseless.r-universe.dev', 'https://cloud.r-project.org')) +``` + ## Highlighting of data.frames with `hl()` `hl()` lets you specify a palette, and the rows/columns of the @@ -221,17 +238,17 @@ svg <- as_svg_anim(objs, width = 600, height = 300, duration = 2, `.Rprofile` - `options(HL_NA = ".")` at any time -| Option | Description | -|:-----------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------| -| `HL_NA` | String to use for NA values. Default “NA” | -| `HL_FULL_COLOUR` | Should full colour ANSI codes be used when outputting to the console? Default: FALSE on Rstudio, but TRUE on all other R consoles | -| `HL_TEXT_MODE` | How to handle text if no text colour has been explicitly specified by the user | -| | `"contrast"` (default) automatically select a colour which contrasts with the background | -| | `"asis"` do not change the colour from the console’s default | -| | `"remove"` remove all text without a user-defined colour | -| `HL_TEXT_CONTRAST` | When `text_mode = "contrast"` this numeric value (in range \[0, 1\]) adjusts the visibility of the text. Default: 1 (high contrast) | -| `HL_GREP_COL` | The fill colour to use with `hl_grep()` if no colour is specified. Default: “\#0F19F0” | -| `HL_SUB_COL`, `HL_INS_COL`, `HL_DEL_COL` | the default colours to use with `hl_diff()` for substitution, insertion and deletion (respectively). | +| Option | Description | +|:---|:---| +| `HL_NA` | String to use for NA values. Default “NA” | +| `HL_FULL_COLOUR` | Should full colour ANSI codes be used when outputting to the console? Default: FALSE on Rstudio, but TRUE on all other R consoles | +| `HL_TEXT_MODE` | How to handle text if no text colour has been explicitly specified by the user | +| | `"contrast"` (default) automatically select a colour which contrasts with the background | +| | `"asis"` do not change the colour from the console’s default | +| | `"remove"` remove all text without a user-defined colour | +| `HL_TEXT_CONTRAST` | When `text_mode = "contrast"` this numeric value (in range \[0, 1\]) adjusts the visibility of the text. Default: 1 (high contrast) | +| `HL_GREP_COL` | The fill colour to use with `hl_grep()` if no colour is specified. Default: “\#0F19F0” | +| `HL_SUB_COL`, `HL_INS_COL`, `HL_DEL_COL` | the default colours to use with `hl_diff()` for substitution, insertion and deletion (respectively). | ## Vignettes diff --git a/man/figures/example-hlgrep-2.svg b/man/figures/example-hlgrep-2.svg index feb60df..9004f3f 100644 --- a/man/figures/example-hlgrep-2.svg +++ b/man/figures/example-hlgrep-2.svg @@ -13,7 +13,7 @@ else switch(tx <- typeof(x), double = , integer = "numeric", closure = , builtin = , special = "function", tx) } -<bytecode: 0x117823688> +<bytecode: 0x13f1b3c68> <environment: namespace:base> diff --git a/man/figures/example-strdiff-4.svg b/man/figures/example-strdiff-4.svg index 078dbf7..fc29f3d 100644 --- a/man/figures/example-strdiff-4.svg +++ b/man/figures/example-strdiff-4.svg @@ -4,10 +4,10 @@
 function (x               , ...) 
 UseMethod("me  an")
-<bytecode: 0x1107a47c 0>
+<bytecode: 0x12852673  0>
 <environment: namespace:b a se>

function (x, na.rm = FALSE, ...) UseMethod("median") -<bytecode: 0x120 a26000> +<bytecode: 0x11f5 73fe0> <environment: namespace:stats >