add_to_slot.gosummaries: Functions for working with gosummaries object

Description Usage Arguments Details Author(s) Examples

View source: R/GOsummaries.R

Description

Functions for working with gosummaries object

Usage

1
2
3
4
5
6
7
8
9
is.gosummaries(x)

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

## S3 method for class 'gosummaries'
x[i, ...]

add_to_slot.gosummaries(x, slot, values)

Arguments

x

a gosummaries object

...

not used

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

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

Author(s)

Raivo Kolde <raivo.kolde@eesti.ee>

Examples

1
2
3
4
5
6
7
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)

raivokolde/GOsummaries documentation built on May 26, 2019, 9:55 p.m.