Title 'Sparklines' in the 'R' Terminal Version 2.0.0 Author Gábor Csárdi Package spark July 21, 2017 Maintainer Gábor Csárdi <csardi.gabor@gmail.com> A 'sparkline' is a line chart, without axes and labels. Its goal is to show the general shape of changes over time, or another quantity. This package is an 'R' implementation of the original shell project: <http://zachholman.com/spark/>. License MIT + file LICENSE LazyData true URL https://github.com/gaborcsardi/spark BugReports https://github.com/gaborcsardi/spark/issues Imports clisymbols (>= 1.2.0), methods, utils Suggests covr, crayon, mockr, testthat RoxygenNote 6.0.1.9000 Encoding UTF-8 NeedsCompilation no Repository CRAN Date/Publication 2017-07-20 22:10:46 UTC R topics documented: spark............................................. 2 spark.default......................................... 2 spark.matrix......................................... 4 sparklines.......................................... 4 Index 5 1
2 spark.default spark Generic spark line method for matrices or frames, etc. Generic spark line method for matrices or frames, etc. spark(, = c("", "auto", "screen"),...) The to plot. screen, and screen otherwise.... Additional arguments to the various methods. Characacter vector containing the spark line(s). Other spark: spark.default, spark.matrix spark.default Spark line of a numeric vector on the terminal For marking the minumum/maximum, the crayon package is needed. ## Default S3 method: spark(, = c("", "auto", "screen"), min = NULL, max = NULL, range = NULL,...)
spark.default 3 min max range The to visualize. It can be a numeric vector, or anything that can be cut into intervals with cut. Infinite values in numeric are ignored, and a black character is plotted instead of them. screen, and screen otherwise. If not NULL, then a crayon style to mark the minimum value. If not NULL, then a crayon style to mark the maximum value. Numeric vector with two elements, the range for the sparklines. Defaults to the range of the.... Not used, it is an error if given. Character scalar containing the spark line. Other spark: spark.matrix, spark Examples ## Annual number of Lynx trappings spark(lynx) ## Scaling to shorter spark(lynx, = 40) ## Changing the range spark(1:10) spark(1:10, range = c(1, 100)) ## Scaling to longer spark(1:10, = 40) ## Luteinizing Hormone in Blood Samples, ## in blue, if the terminal supports it cat(crayon::blue(spark(lh)), "\n")
4 sparklines spark.matrix Spark lines for rows of a matrix. Spark lines for rows of a matrix. ## S3 method for class 'matrix' spark(, = c("", "auto", "screen"), common_scale = TRUE,...) common_scale The matrix to plot. screen, and screen otherwise. Whether to plot all rows on a common scale. If FALSE, then all rows will have their own scales.... Passed to spark.default. E.g. it can be used to mark the minimum and/or maximum values. Character scalar containing the spark line. Other spark: spark.default, spark Examples spark(volcano) spark(t(eustockmarkets), ="auto", common_scale = FALSE) sparklines Sparklines in the R terminal Sparklines in the R terminal
Index spark, 2, 3, 4 spark.default, 2, 2, 4 spark.matrix, 2, 3, 4 sparklines, 4 sparklines-package (sparklines), 4 5