-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
63 lines (43 loc) · 1.62 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output: github_document
always_allow_html: yes
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# c3plot
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/arkraieski/c3plot/check-standard.yaml)
The goal of c3plot is provide to a base 'graphics'-like interface to the [C3.js](https://c3js.org/) JavaScript charting library. The main `c3plot()` function is an S3 generic like the base `plot()` function with methods for various base R objects.
Besides `htmlwidgets`, it has minimal R dependencies. Tidyverse not required!
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("arkraieski/c3plot")
```
## Example
Here’s some example code for a basic scatter plot using R’s `airquality` dataset:
```{r eval=FALSE}
library(c3plot)
air <- airquality
c3plot(air$Ozone, air$Solar.R,
main = "New York Air Quality Measurements",
xlab = "Ozone (ppb)",
ylab = "Solar Radiation (lang)",
col = "red")
```
## Methods
To see a list of S3 methods:
```{r}
library(c3plot)
methods(c3plot)
```
More are on the way! The goal is to replicate the behavior of base R `plot()` methods as closely as possible while also getting the benefits of using C3 (ie. interactivity). Each method has its own help page that can be accessed for additional information.
## Testing
The package is tested on Windows, Linux, and MacOS.