Learn R Programming

Tex4exams (version 0.1.2)

Generating 'Sweave' Code for 'R/exams' Questions in Mathematics

Description

When using the R package 'exams' to write mathematics questions in 'Sweave' files, the output of a lot of R functions need to be adjusted for display in mathematical formulas. Specifically, the functions were accumulated when writing questions for the topics of the mathematics courses College Algebra, Precalculus, Calculus, Differential Equations, Introduction to Probability, and Linear Algebra. The output of the developed functions can be used in 'Sweave' files.

Copy Link

Version

Install

install.packages('Tex4exams')

Monthly Downloads

177

Version

0.1.2

License

GPL (>= 2)

Maintainer

Qingwen Hu

Last Published

May 12th, 2023

Functions in Tex4exams (0.1.2)

c2str

Sequence of rational numbers into comma separated string
rfracF

Convert a decimal into TeX code of vertical fractions with the sign in front of the fraction
pos

TeX code for positivity of randomized values
inversionv

Generating a vector of inversions for a permutation
rcm2l

Converting a matrix into a comma separated string
G3S

Apply the Gram-Schmidt process to orthogonize a group of 3 vectors
c2p

Rational number sequence to polynomial in TeX code
m22l

Converting a matrix into TeX code of a matrix without brackets
hypotex

TeX code of the hypotenuse
c2strpm

Sequence of numbers into a string of TeX code with plus minus signs.
permuorder

Order of permutation
rm2l

Convert a matrix into its transpose in TeX code
perm

Lists permutations of a vector with distinct entries
myGS

Orthogonal projection of y onto x
permucycle

Matrix representation of the cycles of a permutation.
inversions

Count the number of total inversions of a permutation
simpRad

Simplify square roots of positive integers
sintex

Triangle leg values to TeX code of the cosine value
smfrac

Convert multiple decimals into TeX code of back slash fractions
signF

Show minus sign in front of fractions
fmt4

Convert a decimal number into exactly 4 decimal places.
cm2l

Convert a matrix into a comma separated string.
fmtN

Convert a decimal number into exactly n decimal places.
delzero

Delete the first zero in the output remainder of 'polydiv'
cycledisplay

Display the cycle notation of the permutation
costex

Triangle leg values to TeX code of the cosine value
mfrac

Convert multiple decimals into tex code of vertical fractions
m2l

Converting a matrix into TeX code of a matrix with square brackets
rfrac

Convert a decimal into TeX code of vertical fractions