Some symbolic math functions for lazy boys and girls


[Up] [Top]

Documentation for package ‘lazy.symbolic’ version 1.0.0.20250701

Help Pages

A B C D E F G I J K L M N P Q R S T U V misc

-- A --

a2l Convert array to list
a2m Convert array to supermatrix
analyze_expr Decompose an Expression into Additive Terms and Multiplicative Factors
analyze_three_dots Analyze Three Dots and Return the Names and the Values

-- B --

basis Standard Basis Vector
b_diag Makes a Block Diagonal Matrix from the Arguments

-- C --

chkginv Check if the the second matrix is a generalized inverse of the first one, or vice versa.
cprod Cartesian product of many vectors and matrices

-- D --

decompose_MatProd Decompose Matrix Product
demomat Set up a matrix whose elements consist of row and col numbers.
Det Determinant of a Symbolic Matrix by Sweeping
DetL Determinant of a Symbolic Matrix by Laplace Expansion
Diag Diag(x) creats a diagonam matrix from its argument vector or matrix
Dm_core Core Function of the Symbolic Derivative of Trace w.r.t a Matrix

-- E --

Eval Evaluate Symbolic Matrix after Replacement
Expand Expand Expressions by Distributing a Multiplicative Factor

-- F --

find_a_term Find a term separated by a multiplicative operator
find_factors Decompose a Term into Multiplicative Factors separated by ' *, /, %*%, %\@%'.
find_terms Decompose an Expression into Additive Terms separated by '+' or '-'
find_varfunc Find Variables and Functions in an Expression
funcinfo Returns the body of a function

-- G --

gen_random_expr Generate Random Expression
getSM Extract a submatrix from a supermatrix
Ginv Generalized Inverse
greeknum convert subscripted Greek characters
groupmatch Return the captured value for each group

-- I --

interleave Interleave the columns of Two Matrices
Inv Matrix Inversion
invGE Matrix Inversion by Gaussian Elimination
is.number Check if a string vector contains numbers only.
is.varname Check if the argument is a valid variable name
is_solo Check if the input is a single object
is_valid Check If the Input Expression is Valid

-- J --

JacobianMat Calculation of Jacobian Matrix

-- K --

Kmat Commutation Matrix
KP Symbolic Expression of the i-j element of the Kronecker Product

-- L --

l2a Convert list to array
lazy.symbolic lazy.symbolic: Collection of some useful symbolic tools for lazy boys and girls
lazy.symbolic_JPH lazy.symbolic: Collection of some useful symbolic tools for lazy boys and girls 記号演算のための関数群
locbalpar Return the locations of the matching parentheses in a string.
lv Retruns the Last Value

-- M --

m2a Convert supermatrix to array
map Map function to each element of exp
mark_soper Mark Special Operator by Single Alpha
mat2sum Express the i-j element of an Matrix Expression using Summation Operators
matindex Returns the Index to Convert vec(mat) to vec(t(mat)), etc.
matKTimes Symbolic Kronecker Product
matReplace Replace the Elements of a Symbolic Matrix
matSweep Symbolic Matrix Sweep Operator
matSwp Matrix Sweep Operator
matTimes Symbolic Multiplication of Two or More Matrices
Mh2Mv Convert a horizontally stacked supermatrix to a vertially stacked one.
Minus Difference of Two or More Symbolic Expressions
modify_math_operators Modify Mathematical Operators for Symbolic Math
modify_math_operators_JPH 数値演算子の拡張
modSM<- Assign values to the submatrix of a supermatrix
Mv2Mh Convert a vertically stacked supermatrix to a horizontally stacked one.

-- N --

nterms Count the Number of Terms in an Expression

-- P --

P Orthogonal Projection Operators to the Column Space of the Input
Plus Sum of Two or More Symbolic Expression
pmat Generate a permutation matrix to switch row or column.
Print Print multiple objects together with their names (Compact and better version of Print)
Printb Print Super Matrix ( Partitioned Matrix, Block Matrix ) with Separators.
printb Print Super Matrix ( Partitioned Matrix, Block Matrix ) with Separators.
Printm Print multiple objects together with their names (Compact and better version of Print)
printm Print multiple objects together with their names (Compact and better version of Print)
print_tex_as_html Print the LaTex as html in RStudio Viewer pane or a RMarkdown (Quarto) document
Prod Symbolic Product of All the Elements

-- Q --

Q Projection Operators to the Orthogonal Complement of the Column Space of the Input
QRGS QR decomposition of X matrix by the Gram Schmidt orthogonalization or Finding non redundant columns of X

-- R --

repmat Stack a matrix n times either horizontally or vertically.

-- S --

Simplify Simplify Symbolic Expressions (very primitive version)
simplify_power Simplify Power
ssq Returns the (doubly weighted) sum of squares of all the elements of A
str_replace_all Simulate str_replace_all of tidyverse.
Sum Symbolic Sum of All the Elements
sum2mat Express Summation Expressions in Matrix Form
sum2mat0 Express Summation Expressions in Matrix Form (Regexpr version)
sumDisplay Display the Structure of Summations
sumEval Evaluate Summation:
sumExpand Expand (Distribute) summaiton
suminfo Information of Nested Summations
sumMoveIn Move summation to the right
sumSimplify Simplify an expression containing summation
supermat Declare a supermatrix with SMdim attribute
SymbolicOps Examples of Symbolic Operations
SymbolicOps_JPH 拡張された数値演算子の例

-- T --

Times Elementwise Multiplication of Two or More Symbolic Vectors/Matrices
to_latex Convert the input string to LaTex and display it on the RStudio viewer
to_latex_core The core part of to_latex functions by Dr. Fukushima
tp Transposition of a Fully Symbolic Partitioned Matrix
tr trace of the input matrix
tr2vecK Conversion of the Trace of the Product of Several Matrices using vec operator and Kronecker Product #'
trace_reorder Reorder Tracet
transp Transpose each matrix contained in a list/array/supermatrix..

-- U --

unmark_soper Recover the Marked Special Operators

-- V --

varlist Interprete sas-like abbreviated variable list
vec Vectorization of a matrix
vec2vecK Conversion of the vec of Matrix Product using vec operator and Kronecker Product
vecdiag Returns diagonal elements of A as a vector
vech Vectorization of the lower-half or upper-half of a square matrix
vechindex Returns the index to convert vech(Mat) to Mat and vice versa.
vechinv Recover the Symmetric Matrix from its lower or upper half elements stored in a vector created by vech function.
vecvecindex Returns the index to convert vec(Mat) to vec(t(Mat)) and vice versa.

-- misc --

%/.% Mathematica like postfix replacement
%@% matKTimes operator for Kronecker Product
%m% Minus operator for Elementwise Difference
%p% Plus operator for Elementwise Sum
%T% matTimes operator for Matrix Product