print: Print method for multipols

print.multipolR Documentation

Print method for multipols

Description

Print methods for multipols

Usage

## S3 method for class 'multipol'
print(x, ...)
do_dimnames(a, include.square.brackets = getOption("isb"), varname =
getOption("varname"), xyz = getOption("xyz"))
## S3 method for class 'multipol'
as.character(x, ..., xyz = getOption("xyz"), varname =
getOption("varname"))

Arguments

a,x

Multipol or array

include.square.brackets

Boolean with TRUE meaning to, er, include square brackets in the dimnames (eg [x3]^5) and default FALSE meaning to omit them (eg x3^5)

varname

String to describe root variable name (eg varname="y" gives y3^5 or [y3]^5)

xyz

Boolean with default TRUE meaning to represent multipols of dimension d\leq 3 using x, y, and z for the variable names and FALSE meaning to use x1, x2, x3. This option is ignored if d>3; see examples section

...

Further arguments (currently ignored)

Details

Function do_dimnames() is a helper function that takes an array and gives it dimnames appropriate for expression as a multipol. Default behaviour is governed by options isb, varname, and xyz. The function might be useful but it is really intended to be called by print.multipol().

The default behaviour of do_dimnames() and as.character(), and hence the print method for multipols, may be modified by using the options() function. See examples section below.

Author(s)

Robin K. S. Hankin

Examples


ones(2,5)

options("showchars" = TRUE)
ones(2,5)

options("xyz" = FALSE)
ones(2,5)

options("varname" = "fig")
ones(2,5)

options("showchars" = FALSE)
ones(2,5)

do_dimnames(matrix(0,2,3),varname="fig",include=TRUE)


multipol documentation built on Aug. 21, 2023, 9:10 a.m.