# NOT RUN {
MyFTable <- FlexTable( data = mtcars[1:10, ], add.rownames=TRUE )
# modify the text formatting properties for the row.names column
MyFTable[ , 1] <- textProperties( font.style="italic", font.size = 9)
# align text to right for the row.names column
MyFTable[ , 1] <- parProperties( text.align = "right" )
# change cell formatting properties for various columns
MyFTable[ c(3,6:9), c( "mpg", "disp", "hp", "drat", "wt",
"qsec" ) ] <- cellProperties( background.color="#CCCCCC")
# add text to elements of the column cyl
MyFTable[, "cyl", text.properties = textProperties(
vertical.align="superscript", font.size = 9) ] <- " miles/gallon"
# }
Run the code above in your browser using DataLab