Learn R Programming

GOsummaries (version 2.6.0)

is.gosummaries: Functions for working with gosummaries object

Description

Functions for working with gosummaries object

Usage

is.gosummaries(x)
"print"(x, ...)
"["(x, i, ...)
add_to_slot.gosummaries(x, slot, values)

Arguments

x
a gosummaries object
i
index
slot
the component slot name to be filled (e.g Title, Percentage, etc.)
values
list of values where each element corresponds to one component
gosummaries
a gosummaries object
...
not used

Details

Method [ ensures that subsetting gosummaries object will not lose the attributes.

add_to_slot.gosummaries allows to add values to specific slots in the gosummaries object

Examples

Run this code
data(gs_kmeans)

# Add new title to the components
gs_kmeans_new = add_to_slot.gosummaries(gs_kmeans, "Title", 
as.list(paste("K-means cluster", 1:length(gs_kmeans))))

print(gs_kmeans_new)

Run the code above in your browser using DataLab