Tex4exams0.1.2 package

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

c2p

Rational number sequence to polynomial in TeX code

c2str

Sequence of rational numbers into comma separated string

c2strpm

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

cm2l

Convert a matrix into a comma separated string.

costex

Triangle leg values to TeX code of the cosine value

cycledisplay

Display the cycle notation of the permutation

delzero

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

fmt4

Convert a decimal number into exactly 4 decimal places.

fmtN

Convert a decimal number into exactly n decimal places.

G3S

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

hypotex

TeX code of the hypotenuse

inversions

Count the number of total inversions of a permutation

inversionv

Generating a vector of inversions for a permutation

m22l

Converting a matrix into TeX code of a matrix without brackets

m2l

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

mfrac

Convert multiple decimals into tex code of vertical fractions

myGS

Orthogonal projection of y onto x

perm

Lists permutations of a vector with distinct entries

permucycle

Matrix representation of the cycles of a permutation.

permuorder

Order of permutation

pos

TeX code for positivity of randomized values

rcm2l

Converting a matrix into a comma separated string

rfrac

Convert a decimal into TeX code of vertical fractions

rfracF

Convert a decimal into TeX code of vertical fractions with the sign in...

rm2l

Convert a matrix into its transpose in TeX code

signF

Show minus sign in front of fractions

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

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.

  • Maintainer: Qingwen Hu
  • License: GPL (>= 2)
  • Last published: 2023-05-12