textProperties: Text formatting properties

Description Usage Arguments Details Value See Also Examples

View source: R/textProperties.R

Description

Create a textProperties object that describes text formatting properties.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
textProperties(color = "black", font.size = getOption("ReporteRs-fontsize"),
  font.weight = "normal", font.style = "normal", underlined = FALSE,
  font.family = getOption("ReporteRs-default-font"),
  vertical.align = "baseline", shading.color)

## S3 method for class 'textProperties'
print(x, ...)

## S3 method for class 'textProperties'
as.character(x, ...)

## S3 method for class 'textProperties'
chprop(object, color, font.size, font.weight,
  font.style, underlined, font.family, vertical.align, shading.color, ...)

Arguments

color

font color - a single character value specifying a valid color (e.g. "#000000" or "black").

font.size

font size (in point) - 0 or positive integer value.

font.weight

single character value specifying font weight (expected value is normal or bold).

font.style

single character value specifying font style (expected value is normal or italic).

underlined

single logical value specifying if the font is underlined.

font.family

single character value specifying font name (it has to be an existing font in the OS).

vertical.align

single character value specifying font vertical alignments. Expected value is one of the following : default 'baseline' or 'subscript' or 'superscript'

shading.color

shading color - a single character value specifying a valid color (e.g. "#000000" or "black").

x

textProperties object to print

...

further arguments - not used

object

textProperties object to update

Details

Get a modified version of a textProperties with chprop.

Value

a textProperties object

See Also

pot, alterFlexTable, shortcut_properties

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
textProperties( font.size = 12 )
textProperties(color="red", font.weight = "bold",
  font.style = "italic", underlined = TRUE )
textProperties( shading.color = "red" )
print( textProperties (color="red", font.size = 12) )

# chprop usage example ------
textProp <- textProperties()

chprop( textProp, color = "red" )
chprop( textProp, font.size = 12 )
chprop( textProp, font.weight = "bold" )
chprop( textProp, font.style = "italic" )
chprop( textProp, underlined = TRUE )
chprop( textProp, font.family = "Arial" )
chprop( textProp, vertical.align = "superscript" )
chprop( textProp, font.size = 12,
        font.weight = "bold", shading.color = "red" )

Example output

Loading required package: ReporteRsjars
OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
{color:rgba(0,0,0,1.00);font-size:12;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(255,0,0,1.00);font-size:11;font-weight:bold;font-style:italic;underlined:TRUE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;background-color:rgba(255,0,0,1.00);vertical.align:baseline;}{color:rgba(255,0,0,1.00);font-size:12;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(255,0,0,1.00);font-size:11;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:12;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:bold;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:normal;font-style:italic;underlined:FALSE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:normal;font-style:normal;underlined:TRUE;font-family:Times New Roman;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Arial;vertical.align:baseline;}{color:rgba(0,0,0,1.00);font-size:11;font-weight:normal;font-style:normal;underlined:FALSE;font-family:Times New Roman;vertical.align:superscript;}{color:rgba(0,0,0,1.00);font-size:12;font-weight:bold;font-style:normal;underlined:FALSE;font-family:Times New Roman;background-color:rgba(255,0,0,1.00);vertical.align:baseline;}Warning message:
system call failed: Cannot allocate memory 

ReporteRs documentation built on April 1, 2018, 12:06 p.m.