Package: caracas 2.1.2.9004

Mikkel Meyer Andersen

caracas: Computer Algebra

Computer algebra via the 'SymPy' library (<https://www.sympy.org/>). This makes it possible to solve equations symbolically, find symbolic integrals, symbolic sums and other important quantities.

Authors:Mikkel Meyer Andersen [aut, cre, cph], Søren Højsgaard [aut, cph]

caracas_2.1.2.9004.tar.gz
caracas_2.1.2.9004.zip(r-4.7)caracas_2.1.2.9004.zip(r-4.6)caracas_2.1.2.9004.zip(r-4.5)
caracas_2.1.2.9004.tgz(r-4.6-any)caracas_2.1.2.9004.tgz(r-4.5-any)
caracas_2.1.2.9004.tar.gz(r-4.7-any)caracas_2.1.2.9004.tar.gz(r-4.6-any)
caracas_2.1.2.9004.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
caracas/json (API)
NEWS

# Install 'caracas' in R:
install.packages('caracas', repos = c('https://r-cas.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-cas/caracas/issues

Pkgdown/docs site:https://r-cas.github.io

On CRAN:

Conda:

8.74 score 31 stars 1 packages 108 scripts 574 downloads 145 exports 59 dependencies

Last updated from:5adbca4cd6. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK180
source / vignettesOK222
linux-release-x86_64OK184
macos-release-arm64OK153
macos-oldrel-arm64OK237
windows-develOK187
windows-releaseOK219
windows-oldrelOK276
wasm-releaseOK126

Exports:%*%add_prefixall_varsapartar1_sumas_characteras_character_matrixas_diagas_expras_funcas_piecewiseas_symas_vecaskbasis_colbasis_intersectbasis_leftnullbasis_nullbasis_orthcompbasis_rowbdiag_c_cancelcholcollectcolspancolSums_columnspacecrossprod_def_symdef_sym_vecdenominatorderder2detdet_determinantdiagdiag_diag<-diff_matdo_ladoitdrop_remaindereigen_eigenvaleigenveceval_to_symbolexpandexpand_funcexpand_logexpand_trigeye_symfactor_fraction_partsfree_symbolsget_basisget_pyget_sympyGramSchmidthar1_sumhas_sympyhessianinstall_sympyintintersectionspaceinvinv_blockinv_woodburyis_symis_sym_listjacobianleftnullspacelength_limlistifyls_symLUdecompositionmat_powmatrifymatrix_matrix_symmatrix_sym_diagmatrix_sym_symmetricNnullspacenumeratorones_symoptim_symorthcompspacepiecewise_condpiecewise_exprpinvprod_qrqr.Qqr.RQRdecompositionrankMatrix_re_symreciprocal_matrixrep_rowspacerowSums_rrefscale_matrixscoreseq_simplifysingular_valuessolve_linsolve_lower_triangularsolve_syssolve_upper_triangularsubssubs_exprsubs_listsum_svd_sym_classsym_inheritssymbolsymbol_classsymbol_is_matrixsympy_funcsympy_versiontaylortcrossprod_textex_aligntex_eqtex_listtexshowto_listto_matrixto_vectortoeplitz_toeplitz_sumtrace_tuplifyunbracketunscale_matrixvector_symvectorfyzeros_sym

Dependencies:backportsblockmatrixbootbroomclicolorspacecowplotcpp11DerivdoBydplyrfarverforecastfracdiffgenericsggplot2gluegtablehereisobandjsonlitelabelinglatticelifecyclelmtestmagrittrMASSMatrixmicrobenchmarkmodelrnlmennetpillarpkgconfigpngpurrrR6rappdirsRColorBrewerRcppRcppArmadilloRcppTOMLreticulaterlangrprojrootS7scalesstringistringrtibbletidyrtidyselecttimeDateurcautf8vctrsviridisLitewithrzoo

01 - Introduction to 'caracas'

Rendered froma01-introduction.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2022-06-29
Started: 2022-06-29

03 - Objects in 'caracas'

Rendered froma03-objects.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2025-01-09
Started: 2022-08-31

05 - Extending 'caracas'

Rendered froma05-extend-caracas.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2025-01-09
Started: 2022-06-30

11 - Linear algebra in caracas

Rendered froma11-linear-algebra.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2025-01-09
Started: 2022-06-30

16 - Mixed models with caracas

Rendered froma16-mixed-models.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2026-01-27
Started: 2025-01-06

21 - Concentration and covariance matrix in an autoregressive model and in a dynamic linear model

Rendered froma21-ar-ssm.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2023-10-10
Started: 2022-06-29

22 - Fastest route through the forest

Rendered froma22-fastest-route.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2023-08-11
Started: 2022-06-29

91 - Using the 'SymPy' object directly

Rendered froma91-sympy-object.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2022-06-30
Started: 2022-06-30

95 - Arbitrary precision arithmetic

Rendered froma95-arbitrary-precision-arithmetic.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2022-06-30
Started: 2022-06-29

99 - Reference

Rendered froma99-reference.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2025-05-05
Started: 2022-06-29

Chunk engine for easy tex output in Rmarkdown and Quarto

Rendered froma30-chunk-engine.Rmdusingknitr::rmarkdownon May 27 2026.

Last update: 2023-08-16
Started: 2023-08-14

Readme and manuals

Help Manual

Help pageTopics
Extract or replace parts of an object[.caracas_symbol
Extract or replace parts of an object[<-.caracas_symbol
Add prefix to each element of matrixadd_prefix
All variablesall_vars
Partial fraction decomposition on a rational functionapart
Coerce symbol to characteras_character
Get matrix as character matrixas_character_matrix
Construct diagonal matrix from vectoras_diag
Convert caracas object to Ras.expression.caracas_solve_sys_sol as.expression.caracas_symbol as_expr
Convert expression into function object.as.function.caracas_symbol as_func
Convert R object to caracas symbolas_sym
Stacks matrix to vectoras_vec
Convert symbol to characteras.character.caracas_symbol
Ask for a symbol's propertyask
Creates block diagonal caracas matrixbdiag_
Put rational function into standard formcancel
Collects common powers of a term in an expressioncollect
Column space (range) of a symbolic matrixcolspan
Cumulative Sumscumsum.caracas_symbol
Define (invisibly) caracas symbols in global environmentdef_sym def_sym_vec
Symbolic differentiation of an expressionder
Symbolic differentiation of second order of an expressionder2
Determinant methods for caracas_symboldeterminant,caracas_symbol,logical-method determinant,caracas_symbol,missing-method determinant-caracas
Symbolic diagonal matrixdiag_
Replace matrix diagonaldiag-set diag<-
Matrix diagonaldiag,caracas_symbol-method
Replace diagonaldiag<-.caracas_symbol
Difference matrixdiff_mat
Dimensions of a caracas symboldim.caracas_symbol
Dimensions of a caracas symboldim<-.caracas_symbol
Do linear algebra operationdo_la
Perform calculations setup previouslydoit
Remove remainder termdrop_remainder
Create a symbol from a stringeval_to_symbol
Expand a function expressionexpand_func
Expand a logarithmic expressionexpand_log
Expand a trigonometric expressionexpand_trig
Expand expressionfactor_
Get numerator and denominator of a fractiondenominator fraction_parts numerator
Get free symbol in expressionfree_symbols
Generate generic vectors and matricesgeneric-matrices matrix_sym matrix_sym_diag matrix_sym_symmetric vector_sym
Get basisget_basis
Access 'py' objectget_py
Access 'SymPy' directlyget_sympy
Check if 'SymPy' is availablehas_sympy
Head and tail for caracas matriceshead.caracas_symbol head_tail_caracas tail.caracas_symbol
Install 'SymPy'install_sympy
Integrate a functionint
Inverse of block matrixinv_block
Inverse using woodburys matrix identityinv_woodbury
Is object a caracas symbolis_sym
Is list of caracas symbolsis_sym_list
Compute Jacobianjacobian
Kronecker product of two matriceskronecker kronecker,caracas_symbol,caracas_symbol-method
Length of (caracas) objectlength_
Limit of a functionlim
Do linear algebra operationchol,caracas_symbol-method columnspace det det_ eigenval eigenvec eigen_ GramSchmidt intersectionspace inv leftnullspace linalg LUdecomposition nullspace orthcompspace pinv qr,caracas_symbol-method qr.Q,QRdecomposition-method qr.R,QRdecomposition-method QRdecomposition rowspace singular_values svd_ trace_
Finds the basis of the (right) null space.basis_col basis_intersect basis_leftnull basis_null basis_orthcomp basis_row is_caracas_matrix linear_algebra rref
Convert object to list of elementslistify
List defined symbolsls_sym
Matrix powermat_pow
Math functionsMath.caracas_symbol
Creates matrix from array symbolmatrify
Symbolic matrixmatrix_
Matrix cross productcrossprod,caracas_symbol,missing-method crossprod_ matrix_cross_product tcrossprod,caracas_symbol,missing-method tcrossprod_
Matrix multiplication%*% %*%.caracas_symbol matrix-products
Numerical evaluationN
Math operatorsOps.caracas_symbol
General purpose optimization of caracas symbol.optim_sym
Create a piecewise objectas_piecewise piecewise piecewise_cond piecewise_expr [.caracas_piecewise
Print scaled matrixprint.caracas_scaled_matrix
Print solutionprint.caracas_solve_sys_sol
Print symbolprint.caracas_symbol
Product of a functionprod_
Rank of matrixrankMatrix_
Refresh as symbolre_sym
Elementwise reciprocal matrixreciprocal_matrix
Form Row and Column SumscolSums_ rowSums_ rowSums_colSums
Create list of factors as in a productscale_matrix
Score and Hessian matrixhessian score score_hessian
Simplify expressionexpand,caracas_symbol-method simplify
Solve a linear system of equationssolve_lin
Solves a system of non-linear equationssolve_sys
Solve lower or upper triangular systemsolve_lower_triangular solve_triangular solve_upper_triangular
Solve a System of Linear Equationssolve.caracas_symbol
Special matrices: zeros_sym, ones_sym, eye_symeye_sym ones_sym special_matrices zeros_sym
Structured sums for Toeplitz, AR(1), and heterogeneous AR(1) matrices.ar1_sum har1_sum structured_sums toeplitz_sum
Substitute symbols in an expressionsubs
Substitute symbols (expression interface)subs_expr
Substitute symbol for valuesubs_list
Sum of a functionsum_
Summationsum.caracas_symbol
Ask type of caracas symbolsym_class
Ask if type of caracas symbol is of a requested typesym_inherits
Create a symbolsymbol
Ask type of caracas symbolsymbol_class
Check if object is a caracas matrixsymbol_is_matrix
Call a SymPy function directly on xsympy_func
Get 'SymPy' versionsympy_version
Transpose of matrixt.caracas_symbol
Taylor expansiontaylor
Export object to TeXtex
Export caracas objects to TeXtex_align tex_caracas tex_eq tex_list
Export scaled matrix to textex.caracas_scaled_matrix
Dump latex representation of sympy object.texshow
Coerce caracas objectto_list to_matrix to_something to_vector
Topelitz matrix as caracas matrix.toeplitz_
Convert object to tupletuplify
Remove inner-most dimensionunbracket
caracas version of standard R functionsc_ rep_ seq_ underscore
Extract unique elementsunique.caracas_symbol
Extract matrix from scaled matrixunscale_matrix
Create a vector alongvec_along
Creates symbol vector from list of caracas symbolsvectorfy