c2p {Tex4exams}R Documentation

Rational number sequence to polynomial in TeX code

Description

The function 'polynomial' in the 'polynom' package converts a sequence of rational numbers into a polynomial with decimal coefficients. This function 'c2p' converts the output of 'polynomial' into the TeX form of a polynomial where coefficients are of vertical fraction form using the package 'fractional'.

Usage

c2p(m)

Arguments

m

a list of rational numbers which are coefficients of a polynomial in descending order.

Details

The function uses 'polynomial' function from the package 'polynom' which defaults the polynomial in ascending order.

Value

The function returns a string of TeX code of the polynomial with rational coefficients.

See Also

c2str, c2strpm.

Examples

m <- sample(c(1:100),5)
m
c2p(m)

[Package Tex4exams version 0.1.2 Index]