Type: | Package |
Title: | Lightweight ASCII Line Graphs |
Version: | 0.1.0 |
Author: | Brian Lee Mayer |
Maintainer: | Brian <bleemayer@gmail.com> |
Description: | Create ASCII line graphs of a time series directly on your terminal in an easy way. There are some configurations you can add to make the plot the way you like. This project was inspired by the original 'asciichart' package by Igor Kroitor. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | methods |
RoxygenNote: | 7.1.0 |
NeedsCompilation: | no |
Packaged: | 2020-06-09 16:55:12 UTC; rstudio |
Repository: | CRAN |
Date/Publication: | 2020-06-14 15:10:02 UTC |
ASCII chart of vector. Generate an ascii chart for a series of numbers.
Description
asciiPlot
returns a character string of a chart for given series.
Usage
asciiPlot(series, cfg = list())
Arguments
series |
A numeric vector, missing data values in the series can be specified as a NA. |
cfg |
A named list with some options: |
Value
A character string
Examples
series <- c(1,2,3,4,4,3,2,1)
cat(asciiPlot(series))
series <- c(1,2,3,NA,4,3,NA,1)
cat(asciiPlot(series))
series <- c(1,2,3,4,NA,4,3,2,1)
cat(asciiPlot(series, list('min' = 0)))
## Not run:
cat(asciiPlot(c(NA, NA)))
## End(Not run)