Coder Social home page Coder Social logo

matador's Introduction

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)
#> Loading required package: magrittr
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)
#> $`1`
#>      [,1] [,2] [,3]
#> [1,]    1    4    7
#> [2,]    2    5    8
#> [3,]    3    6    9
#> 
#> $`2`
#>      [,1] [,2] [,3]
#> [1,]   30   66  102
#> [2,]   36   81  126
#> [3,]   42   96  150
#> 
#> $`3`
#>      [,1] [,2] [,3]
#> [1,]  468 1062 1656
#> [2,]  576 1305 2034
#> [3,]  684 1548 2412
#> 
#> $`4`
#>       [,1]  [,2]  [,3]
#> [1,]  7560 17118 26676
#> [2,]  9288 21033 32778
#> [3,] 11016 24948 38880
#> 
#> $`5`
#>        [,1]   [,2]   [,3]
#> [1,] 121824 275886 429948
#> [2,] 149688 338985 528282
#> [3,] 177552 402084 626616

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.

matador's People

Contributors

ryan-heslin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.