sorhawell / styler.equals

A style for equals assignment, based on the styler package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

styler.equals

This package is based on https://github.com/lorenzwalthert/styler.yours

Lifecycle: experimental R-CMD-check

The goal of {styler.equals} is to provide an implementation of the ‘equals style’ used by Yuhei Xie, Colin Gillespie and many in the #rspatial community.

So far it basically just the ‘tidyverse style’ but with equals assignment. In the future it may evolve, e.g. to implement the Geocomputation with R style guide.

It is a third-party style guide for {styler}.

Installation

You can install the released version of {styler.equals} from GitHub with:

remotes::install_github("robinlovelace/styler.equals")

Example

This is a basic example of how to style code with it.

library(styler.equals)
cache_deactivate()
#> Deactivated cache.
text = "x <- 4
y = 3
a;
"

text_styled_equals = style_text(text)
text_styled_equals
#> Warning: Could not use colored = TRUE, as the package prettycode is not
#> installed. Please install it if you want to see colored output or see
#> `?print.vertical` for more information.
#> x = 4
#> y = 3
#> a;

About

A style for equals assignment, based on the styler package

License:Other


Languages

Language:R 100.0%