knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

matador

matador is a simple package intended for plotting and working with matrices. It is intended to help students complete typical linear algebra problems using Rmarkdown.

Installation

matador depends on several of the core tidyverse packages, namely purrr, dplyr, and ggplot2, as well as the ggplot2 extension cowplot.

You can install matador using

devtools::install_github("ryan-heslin/matador")

Examples

Here are a few demonstrations of matador's functionality:

matador makes it easy to visualize two-dimensional linear transformations:

library(matador)
ggplot2::theme_set(ggplot2::theme_minimal())
plot_transform(trans = matrix(c(-1, 1,1, -1), nrow =2))

You can do the same for systems of equations:

plot_lines(m = matrix(c(-5, 2, 3, 7), nrow =2))

Or easily compute arbitrary powers of matrices:

mat_pows(matrix(1:9, nrow = 3), 1:5)

Or even display the orthogonal decomposition of a matrix:

plot_decomposition(square(1, 2, 1, -4))

For more details, take a look at the package vignette.

Acknowledgments

This package could not have been developed without the invaluable devtools package, which simplifies and automates the process of package development.

make_axes benefited greatly from this StackOverflow exchange.

Documentation for vec_helpers drew on this resource.

print_eqn was inspired by this StackOverflow post.

My primary linear algebra resource was Otto Bretscher's Linear Algebra with Applications (5th ed.).

Professor Joshua Lansky's linear algebra course inspired this package and gave me the knowledge in linear algebra to complete it.



ryan-heslin/matador documentation built on Dec. 22, 2021, 8:17 p.m.