Learn R Programming

stoRy (version 0.1.5)

theme: Theme objects

Description

The stoRy package uses the theme object to store information about themes in the package theme dataset.

Arguments

Methods

Public methods

Method new()

Usage

theme$new(theme)

Arguments

theme

A string representing a theme in the dataset.

Method print()

Usage

theme$print(...)

Method clone()

The objects of this class are cloneable with this method.

Usage

theme$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
########################################################################
# Create a theme object for the theme "utopia" and print the result    #
########################################################################
theme_name <- "utopia"
mytheme <- theme$new(theme_name)
mytheme$print()

########################################################################
# Display the "utopia" theme and its descendent themes in tree format  #
########################################################################
print_tree(mytheme)

########################################################################
# Display the "society" theme hierarchy in tree format                 #
########################################################################
theme_name <- "society"
mytheme <- theme$new(theme_name)
print_tree(mytheme, pruneMethod = "dist", limit = 50)
# }

Run the code above in your browser using DataLab