ptvalue: ptvalue: Working with precision teaching values

View source: R/ptvalue.R

ptvalueR Documentation

ptvalue: Working with precision teaching values

Description

This class allow to print precision teaching mesures with the times or the division symbols like \times 2 or \div 1.4 by converting numeric values to precision teaching values. More specifically, input values between ] 0, 1 [ will return output values greater or equal than 1 prefixed with \div; input values between [ 1, \infty [ will return output values greater or equal than 1 prefixed with \times.

Usage

ptvalue(x = double())

is_ptvalue(x)

as_ptvalue(x, ...)

## Default S3 method:
as_ptvalue(x, ...)

Arguments

x

A numeric vector. Values must be greater than 0.

...

Other values passed to method.

Details

A few arithmetic operations will be allowed in the futur. It is currently under development.

Value

A numeric vector of class ptvalue that represent precision teaching mesures.

Examples

x <- c(0.5, 0.8, 1, 1.25, 2)
ptvalue(x)
x <- c(0.5, 1, 2)
as_ptvalue(x)

ptvalue documentation built on Aug. 30, 2025, 1:08 a.m.