knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", fig.asp = 0.618, out.width = "100%" ) `%<-%` <- keras::`%<-%`
The goal of rraysplot is to make 2D arrays and matrices plots less aggravating.
You can install the development version of rraysplot from GitHub with:
# install.packages("devtools") devtools::install_github("ventri2020/rraysplot")
This is a basic example which shows you how to solve a common problem:
library(rraysplot) set.seed(202011) c(ch5, r5, z5, o5, sq5) %<-% make_arrays(m = 5, n = 5)
plot_array2d(ch5, title = "checker", title_size = 54) plot_array2d(r5, title = "urandom", title_size = 54) plot_array2d(z5, title = "zeros", title_size = 54) plot_array2d(o5, title = "ones", title_size = 54) plot_array2d(sq5, title = "square", title_size = 54)
plot_array2d(list(ch5, sq5)) plot_array2d(list(ch5, o5, sq5)) plot_array2d(list(ch5, r5, z5)) d5 = z5 d5[1, 1] = 1 d5[3, 3] = 0.75 d5[5, 5] = 0.5 plot_array2d(list(ch5, d5, d5)) plot_array2d(list(ch5, o5, d5))
Note that the mm
values are rescaled to (0,1) range
by the bhistogram
function.
mm = c(rnorm(1500, 0, .1), rnorm(1000, 1, .2)) bhistogram(mm, title = "Multimodal frequencies", title_size = 16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.