Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shikokuchuo/fireworks

Fireworks for R
https://github.com/shikokuchuo/fireworks

r r-package rstats

Last synced: 1 day ago
JSON representation

Fireworks for R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
warning = TRUE,
message = TRUE,
error = TRUE,
echo = TRUE,
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```

# fireworks

[![fireworks status badge](https://shikokuchuo.r-universe.dev/badges/fireworks?color=42147b)](https://shikokuchuo.r-universe.dev/fireworks)
[![R-CMD-check](https://github.com/shikokuchuo/fireworks/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/fireworks/actions)
[![codecov](https://codecov.io/gh/shikokuchuo/fireworks/graph/badge.svg)](https://app.codecov.io/gh/shikokuchuo/fireworks)

```
________
/\firewo \
/ \ 花 rk \
\ / 火 s /
\/_______/
```
Fireworks for R

A toolbox for hacking on the language.

`fireworks` provides a copy of `Defn.h` from R 4.4.0, allowing packges linking to it access to internal R source definitions.

These provide, _inter alia_, the ability to directly manipulate a `SEXPREC` struct.

### Quick Start

1. Add `fireworks` to your package DESCRIPTION under `LinkingTo:`
2. Add the line `#include "fireworks.h"` in your C/C++ file below other R header includes

The package also includes a couple of demo functions:

```{r fireworks}
library(fireworks)
```

```{r fountain}
x <- fountain()
str(x)
x[1]
x[]
```

```{r sparkle}
isS4(x)
sparkle(x)
isS4(x)
```

```{r boom}
boom()
tryCatch(boom(), error = function(e) TRUE)
x <- boom()

isS4(sparkle(boom()))
```

### Installation

Install the latest dev build from R-universe:

```{r runiv, eval=FALSE}
install.packages("fireworks", repos = "https://shikokuchuo.r-universe.dev")
```

### Links

◈ fireworks R package:

--

Please note that this project is released with a [Contributor Code of Conduct](https://shikokuchuo.net/secretbase/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms.