col_to_rownames
Description
turns a column of the input data frame and turns it into its rownames, and
then removes the actual column.
Usage
col_to_rownames(data_frame, col = 1)
col_to_rownames(data_frame, col = 1)
Arguments
data_frame |
Data frame to manipulate.
|
col |
An integer. Col to set as new rowumns and remove from data frame.
|
Value
The modified data frame.
Examples
col_to_rownames(tail(mtcars))
col_to_rownames(tail(mtcars))
htmlReport reference class
Description
An htmlreporter reference class
Build report by loading files from disk and rendering template.
Description
Main htmlreportR script mode function. Renders a template,
Usage
main_htmlreportR(options)
main_htmlreportR(options)
Arguments
options |
list containing all necessary elements to build an
htmlReport instance.
|
Details
Main htmlreportR scripting function
Value
None
Examples
## Not run:
options <- list(title = "main_htmlreportR example",
data_files = "path/to/file1", "path/to/fileN",
output_file = "path/to/output",
source_folder = "path/to/package/scripts",
compress_obj = TRUE,
css_files = "path/to/custom/css",
js_files = "path/to/custom/js",
cdn_css = "path/to/cdn_css",
cdn_js = "path/to/cdn_js",
menu = "menu")
main_htmlreportR (options)
## End(Not run)
options <- list(title = "main_htmlreportR example",
data_files = "path/to/file1", "path/to/fileN",
output_file = "path/to/output",
source_folder = "path/to/package/scripts",
compress_obj = TRUE,
css_files = "path/to/custom/css",
js_files = "path/to/custom/js",
cdn_css = "path/to/cdn_css",
cdn_js = "path/to/cdn_js",
menu = "menu")
main_htmlreportR (options)
Make HTML Report Head
Description
This method generates the head section of an HTML report by adding the title to an htmlReport object.
Details
Make HTML Report Head
Value
An updated htmlReport object with the title added to its head section.
make_html_list
Description
Take an input vector or list and use it to build an html list of specified
type
Usage
make_html_list(
list_content,
list_levels = NULL,
list_types = NULL,
default_type = "ul"
)
make_html_list(
list_content,
list_levels = NULL,
list_types = NULL,
default_type = "ul"
)
Arguments
list_content |
Vector or list of elements with which to build the list
|
list_levels |
Vector or list defining nesting levels. Default NULL
|
list_types |
Vector or list with types to assign to each element ("ul"
for unordered or "ol" for ordered).' If not supplied, default_type will
determine list type for each element. Default NULL
|
default_type |
List type to default if list_types is undefined, "ul"
for unordered or "ol" for ordered. Default "ul"
|
Value
Formatted html list ready to render.
Examples
content <- c("One", "Two", "Three")
make_html_list(list_content = content)
content <- c("One", "Two", "Three")
make_html_list(list_content = content)
parse_paths
Description
takes a vector of comma-separated paths and parses it so files can be loaded.
If any of the paths contain wildcards, they will be expanded.
Usage
parse_paths(string)
parse_paths(string)
Arguments
string |
String containing paths to expand.
|
Value
Every path found with provided expression.
Examples
dir <- file.path(find.package("htmlreportR"), "tests/*")
parse_paths(dir)
dir <- file.path(find.package("htmlreportR"), "tests/*")
parse_paths(dir)
replace_paired_mark
Description
Recursively replaces paired marks in a string.
Usage
replace_paired_mark(string, pattern, replace)
replace_paired_mark(string, pattern, replace)
Arguments
string |
String to edit
|
pattern |
Pattern to recursively replace
|
replace |
Vector containing, in that order, expression that will replace
the first paired element and the second paired element
|
Value
Modified string.
Examples
example_string <- "** This should be in bold **"
pattern <- "(\\*\\*+?)([- \\w]+)(\\*\\*+?)"
replace_paired_mark(example_string, pattern, c("<strong>", "</strong>"))
example_string <- "** This should be in bold **"
pattern <- "(\\*\\*+?)([- \\w]+)(\\*\\*+?)"
replace_paired_mark(example_string, pattern, c("<strong>", "</strong>"))