formattedDifference: Table Row Difference

Description Usage Arguments Examples

View source: R/functions.R

Description

CSS styling for Row Difference with colours and signs eg. 18650 <span style="color:green">+113</span>

Usage

1
formattedDifference(v, cv, rv = 1, flipColour = 0, flipSign = 0, signSet = 1)

Arguments

v

a vector of values

cv

a vector of compare values

rv

determines the report value (rv) to display first, eg, 1 is v, 2 is cv

flipColour

default = 0, meaning positive numbers are green. if reverse = 1, negative numbers are green.

flipSign

default = 0, positive values are +, if flipSign = 1 then positive values are -

signSet

default = 1, this uses arrows instead of + / -

Examples

1
2
3
4
5
formattedDifference(v = 3:5, cv = 4, rv = 1, flipColour = 1, flipSign = 1, signSet = 2)
formattedDifference(3:5, 4, 1, 1)
formattedDifference(3:5, 4, 1, 0)
formattedDifference(1:3, 2:3, 1) # errors
formattedDifference(2, 1:3, 1, 0)

andrew-a-hale/initmediaRUtils documentation built on Aug. 25, 2020, 2:51 p.m.