+ All Categories
Home > Documents > The rggobi Package - University of...

The rggobi Package - University of...

Date post: 07-Sep-2018
Category:
Upload: nguyenbao
View: 214 times
Download: 0 times
Share this document with a friend
42
The rggobi Package April 6, 2006 Version 2.1.1 Date 2006/3/23 Title Interface between R and GGobi Author Duncan Temple Lang <[email protected]>, Debby Swayne <[email protected]>, Depends R (>= 2.2.0) SystemRequirements GGobi Maintainer Hadley Wickham <[email protected]> Description An interface from R to ggobi for programmatic dynamic, interactive visualization. License BSD LazyData true URL http://www.ggobi.org/ Acknowledgements Di Cook, Nicholas Lewin-Koh, Xuejing Chen. R topics documented: .GGobiCall ......................................... 2 addVariable.ggobiDataset .................................. 3 "as.data.frame.ggobiDataset" ................................ 4 clean.ggobi ......................................... 5 close.ggobi ......................................... 5 "colorscheme<-" ...................................... 6 colorscheme ......................................... 7 connecting_edges ...................................... 7 create_time_edges_for_unit ................................. 8 create_time_edges ...................................... 8 dataset ............................................ 9 dim.ggobiDataset ...................................... 10 dimnames.ggobiDataset ................................... 10 "edges<-" .......................................... 11 edges ............................................ 12 "excluded<-.ggobiDataset" ................................. 12 1
Transcript

The rggobi PackageApril 6, 2006

Version 2.1.1

Date 2006/3/23

Title Interface between R and GGobi

Author Duncan Temple Lang <[email protected]>, Debby Swayne<[email protected]>,

Depends R (>= 2.2.0)

SystemRequirements GGobi

Maintainer Hadley Wickham <[email protected]>

Description An interface from R to ggobi for programmatic dynamic, interactive visualization.

License BSD

LazyData true

URL http://www.ggobi.org/

Acknowledgements Di Cook, Nicholas Lewin-Koh, Xuejing Chen.

R topics documented:.GGobiCall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2addVariable.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3"as.data.frame.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4clean.ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5close.ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5"colorscheme<-" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6colorscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7connecting_edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7create_time_edges_for_unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8create_time_edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9dim.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10dimnames.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10"edges<-" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12"excluded<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1

2 .GGobiCall

excluded.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13"[.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14"$.ggobi" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15ggobi_check_structs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15ggobi_count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16ggobi_data_set_variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17ggobi.find.file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18ggobi_get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19ggobi_longitudinal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20ggobi_set_data_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20ggobi_set_data_frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.ggobi.symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22ggobi_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22"glyph_colour<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23glyph_colour.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24"glyph_size<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24glyph_size.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25"glyph_type<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26glyph_type.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26"ids<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27ids.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28mapGlyphType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28"names<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29names.ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29names.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30ncol.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31nrow.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31print.ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32print.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32"rownames<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33rownames.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34selected.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34"[<-.ggobi" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35"[<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36"shadowed<-.ggobiDataset" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37shadowed.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37summary.ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38summary.ggobiDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39valid_ggobi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39variable_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Index 41

.GGobiCall Wrappers for calling C routines in the R-ggobi library.

Description

addVariable.ggobiDataset 3

Usage

.GGobiCall(.name, ..., .gobi = ggobi_get(), .test=TRUE)

Arguments

.name the simple name of the C routine to be resolved

... the arguments that to be passed to the .C or .Call

.gobi the ggobi instance identifier that is to be passed to the C routine as its last argu-ment

.test

Details

.GGobiC and .GGobiCall convert the name and then call their C invocation counterparts.

These functions map the simple name of a C routine into the package-specific version of that name.These allow use to hide the use a name mangling scheme of our choosing for the C level routines inthe shared library/DLL that provides the glue between R and ggobi. This is useful for avoiding nameconflicts with other C code in R or other packages. These are only of relevance to the developers ofthis package and those working with its C code.

The mapping of the name to its corresponding C routine name is done in conjunction with thepre-processor macro RS_GGOBI. These must be synchronized.

Value

the same result as the corresponding .C and .Call

Author(s)

Hadley Wickham <[email protected]>

See Also

.C, .Call

Examples

addVariable.ggobiDatasetAdd variable

Description

Add variable to a ggobiDataset

Usage

addVariable.ggobiDataset(x, vals, name, ...)

4 "as.data.frame.ggobiDataset"

Arguments

x ggobiDataset

vals values to add

name name of column to add

...

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

"as.data.frame.ggobiDataset"Conversion methods

Description

Convert a ggobiDataset to a regular R data.frame or matrix

Usage

"as.data.frame.ggobiDataset"(x, ...)

Arguments

x ggobiDataset

...

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

clean.ggobi 5

clean.ggobi Clean ggobi

Description

Clean arguments for ggobi

Usage

clean.ggobi(x)

Arguments

x vector

Details

Arguments for ggobi need to be in specific format. This function helps ensure that.

Author(s)

Hadley Wickham <[email protected]>

Examples

close.ggobi Close GGobi instance

Description

Terminates and discards a ggobi instance

Usage

close.ggobi(con, ...)

Arguments

con ggobi object to close

... ignored and for compatability generic function.

Details

This allows the caller to close a ggobi instance and discard the resources it uses. The function closesthe display windows and variable panel window associated with this ggobi instance. It also resetsthe default ggobi instance to be the last one created.

@arguments ggobi object to close @arguments ignored and for compatability generic function.@keyword dynamic

6 "colorscheme<-"

Author(s)

Hadley Wickham <[email protected]>

Examples

g1 <- ggobi(mtcars)g2 <- ggobi(mtcars)close(g2)close(ggobi_get())

"colorscheme<-" Set active colour scheme.

Description

Specify the active color scheme in a GGobi instance or the session options.

Usage

"colorscheme<-"(x, value)

Arguments

x GGobi object

value colour scheme to make active

Details

This makes a particular color scheme active within a GGobi instance.

Value

The name of the previously active color scheme.

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)colorscheme(g) <- "Set1 8"colorscheme(g) <- 1

colorscheme 7

colorscheme Get active colour scheme

Description

Get name of the active colour scheme

Usage

colorscheme(x)

Arguments

x GGobi object

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)colorscheme(g)

connecting_edges Get connecting edges

Description

Get actual edges from application of edges dataset to target dataset.

Usage

connecting_edges(x, y)

Arguments

x target ggobi dataset

y ggobi dataset containing edges

Details

Author(s)

Hadley Wickham <[email protected]>

8 create_time_edges

Examples

create_time_edges_for_unitCreate time edges for a unit

Description

Create time edges for a unit

Usage

create_time_edges_for_unit(d, time)

Arguments

d data frame of observations from one unit

time time variable

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

create_time_edges Create time edges

Description

Generate the connecting edges for longitudinal data

Usage

create_time_edges(data, time = "Time", obsUnit = "ID")

Arguments

data the dataset from which to compute the edge connections.

time name/index of time variable

obsUnit name/index of ID variable

dataset 9

Details

This function takes a data frame containing records with repeated measurements for a given ob-servational unit and generates the appropriate edge information so that consecutive time points canbe connected in a GGobi display. The output of this function can be given to setEdges to enableviewing these time series plots for individuals.

Currently this only works if the data are sorted by ID. This will be fixed in the future as it requiresre-ordering the records from the original dataset.

Value

A matrix with 2 columns and as many rows as in original data. Each row in this matrix gives adirected line segment connecting one point in time to the next point in time

Author(s)

Hadley Wickham <[email protected]>

Examples

dataset Get ggobi dataset.

Description

Get an object representing an internal ggobi dataset

Usage

dataset(which, .gobi = ggobi_get())

Arguments

which which dataset to retrieve, an integer for positional matching or a character tomatch by name

.gobi GGobi instance

Details

It is convenient to be able to refer to and operate on a ggobi dataset as if it were a regular R dataset.This function allows one to get an ggobiDataset object that represents a particular dataset.

Value

A list of ggobiDataset objects

Author(s)

Hadley Wickham <[email protected]>

10 dimnames.ggobiDataset

See Also

link{.ggobi}

Examples

dim.ggobiDataset ggobiDataset dimensions

Description

Retrieve the dimension of an ggobi dataset

Usage

dim.ggobiDataset(x)

Arguments

x dataset

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

dimnames.ggobiDatasetGet dimension names

Description

Get row and column names for a ggobiDataget

Usage

dimnames.ggobiDataset(x)

Arguments

x ggobiDataget

"edges<-" 11

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

"edges<-" Set edges

Description

Set edges for a dataset.

Usage

"edges<-"(x, value)

Arguments

x ggobiDataset

value matrix or data frame of edges. First column should be from edge, second columnto edge.

Details

To remove edges, set edges to NULL.

@arguments ggobiDataset @arguments matrix or data frame of edges. First column should be fromedge, second column to edge. @keyword manip

Author(s)

Hadley Wickham <[email protected]>

Examples

cc<-cor(t(swiss),use="p", method="s")ccd<-sqrt(2*(1-cc))a <- which(lower.tri(ccd), arr.ind=TRUE)src <- row.names(swiss)[a[,2]]dest <- row.names(swiss)[a[,1]]weight <- as.vector(as.dist(ccd))gg <- ggobi(swiss)gg$cor <- data.frame(weight)edges(gg$cor) <- cbind(src, dest)edges(gg$cor)edges(gg$cor) <- NULL

12 "excluded<-.ggobiDataset"

edges Get edges

Description

Get edges for a dataset

Usage

edges(x)

Arguments

x ggobi dataset

Details

Value

A matrix of edge pairs

Author(s)

Hadley Wickham <[email protected]>

Examples

"excluded<-.ggobiDataset"Set excluded status

Description

Set the exclusion status of points.

Usage

"excluded<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value logical vector

Details

If a point is excluded it is not drawn.

excluded.ggobiDataset 13

Author(s)

Hadley Wickham <[email protected]>

See Also

excluded

Examples

excluded.ggobiDatasetGet excluded status

Description

Get the exclusion status of points.

Usage

excluded.ggobiDataset(x)

Arguments

x ggobiDataget

Details

If a point is excluded it is not drawn.

Author(s)

Hadley Wickham <[email protected]>

See Also

excluded<-

Examples

14 "[.ggobiDataset"

"[.ggobiDataset" Subsettting

Description

Subsetting for ggobi datasets

Usage

"[.ggobiDataset"(x, i, j, drop=FALSE)

Arguments

x arguments for generic data.frame subset function

i drop dimensions?

j

drop

Details

This functions allow one to treat a ggobi dataset as if it were a local data.frame. One can extractand assign elements within the dataset.

This method works by retrieving the entire dataset into R, and then subsetting with R.

Value

desired subset from data.frame

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)x <- g$mtcarsx[1:5, 1:5]x[[1]]x$cyl

"$.ggobi" 15

"$.ggobi" Get ggobi data.

Description

Conveniently retrieve ggobi dataset.

Usage

"$.ggobi"(x, i)

Arguments

x GGobi object

i name of dataset to retrive

Details

It is convenient to be able to refer to and operate on a ggobi dataset as if it were a regular R dataset.This function allows one to get an ggobiDataset object that represents a particular dataset.

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(ChickWeight)g["cars"] <- mtcarsg[1:2]g["ChickWeight"]g["cars"]g$cars

ggobi_check_structsCheck structs

Description

Validates GGobi and Rggobi views of internal data structures

Usage

ggobi_check_structs()

Arguments

16 ggobi_count

Details

This function is called when the Rggobi library is loaded and it verifies that the sizes of the differentinternal data structures for GGobi are the same for both the GGobi shared library/DLL and theRggobi package. This is important as the two shared libraries are compiled separately and mayhave different compilation flags, etc. that make them incompatible. This function simply comparesthe sizes of the two views of the structures and raises a warning if they do not agree.

Essentially, you should never notice this function. A warning implies that you need to re-installRggobi against the version of GGobi you are using.

@value TRUE if the sizes in the two libraries are the same, otherwise a named logical vectorindicating which structures are different

Value

TRUE if the sizes in the two libraries are the same, otherwise a named logical vector indicatingwhich structures are different

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi_count Get number of GGobis

Description

Retrieves the number of ggobi instances within this session

Usage

ggobi_count()

Arguments

Details

One or more ggobi instances can be created within an R session so that one can simultaneously lookat different datasets or have different views of the same dataset. This function returns the numberof ggobis in existence.

The different ggobi instances are maintained as C level structures. This function accesses a variablethat stores how many are in existence when the function is invoked.

Author(s)

Hadley Wickham <[email protected]>

ggobi_data_set_variables 17

Examples

ggobi_count()

ggobi_data_set_variablesSet variable values

Description

Set the variable values for a column in a ggobiDataset

Usage

ggobi_data_set_variables(x, values, var, update = TRUE)

Arguments

x ggobiDataset

values values of new variable

var variable name

update update?

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi.find.file Find GGobi file.

Description

Finds a file stored somewhere in the ggobi installation.

Usage

ggobi.find.file(..., check = F)

Arguments

... bits of the path to join together

check

18 ggobi

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi.find.file("data","tips.xml")

ggobi New ggobi

Description

Creates a new ggobi instance

Usage

ggobi(data, args=character(0), mode=character(0), name = deparse(sys.call()[[2]]), ...)

Arguments

data the name of a file containing the data, or a data frame or matrix containing thevalues

args a character vector of command-line arguments

mode data format GGobi should expect to read the data from, if reading from a file.

name the name to use in GGobi for the dataset, if one is specified

...

Details

Create a new instance of GGobi with or without new data. Use function whenever you want tocreate a new GGobi indepdent of the others—they will not share linked plots. If you want to addanother dataset to an existing ggobi, please see [<-.ggobi

There are currently three basic types of functions that you can use with rggobi:

• Data getting and setting: see [.ggobi, and [.ggobiDataset

• "Automatic" brushing: see glyph_colour, glyph_size, glyph_type, shadowed,excluded, and the associated setter functions.

• Edge modifcation: see edges, edges<-, ggobi_longitudinal

You will generally spend most of your time working with ggobDatasets, you retrieve using$.ggobiDataset, [.ggobiDataset, or [[.ggobiDataset. Most of the time these willoperate like normal R datasets while pointing to the data in GGobi so that all changes are kept insync. If you need to force a ggobiDaataset to be an R data.frame use as.data.frame.

ggobi_get 19

Value

A ggobi object

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi(ggobi.find.file("data", "flea.csv"))ggobi(ggobi.find.file("data", "flea.xml"))ggobi(mtcars)mtcarsg <- ggobi_get()$mtcarsglyph_colour(mtcarsg)glyph_colour(mtcarsg) <- ifelse(mtcarsg$cyl < 4, 1, 2)glyph_size(mtcarsg) <- mtcarsg$cyl

ggobi_get Get GGobi

Description

Returns a ggobi reference

Usage

ggobi_get(id = ggobi_count(), drop=TRUE)

Arguments

id numeric vector indicating which ggobi instances to retrieve. Use default if nonespecified

drop

Details

This allows one to get a list of all the ggobi instances currently in existence in the R session. Also,one can fetch particular instances.

@arguments numeric vector indicating which ggobi instances to retrieve. Use default if none spec-ified @returns list of ggobi instances @keyword dynamic

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi(mtcars)ggobi(Nile)ggobi_get(1)ggobi_get(1:2)

20 ggobi_set_data_file

ggobi_longitudinal Create longitudinal dataset.

Description

Instantiate new ggobi with a longitudinal data set.

Usage

ggobi_longitudinal(data, time = "Time", obsUnit = "ID")

Arguments

data data frame

time time variable

obsUnit id variable

Details

@arguments data frame @arguments time variable @arguments id variable @keyword dynamic

Author(s)

Hadley Wickham <[email protected]>

Examples

data(Oxboys, package="nlme")ggobi_longitudinal(Oxboys, "Occasion", "Subject")

ggobi_set_data_fileSet data file.

Description

Open data file and add to ggobi datasets.

Usage

ggobi_set_data_file(file, mode = "unknown", add = TRUE, .gobi = ggobi_get())

Arguments

file path to file

mode mode of file

add add?

.gobi ggobi instance

ggobi_set_data_frame 21

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi_set_data_frameSet data frame.

Description

Add data.frame to ggobi instance.

Usage

ggobi_set_data_frame(data, name = deparse(sys.call()[[2]]), description = paste("R data frame", name), id = rownames(data), .gobi = ggobi_get())

Arguments

data data frame to add

name data set name (appears on tabs in ggobi)

description description of data frame

id rownames

.gobi ggobi instance

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

22 ggobi_version

.ggobi.symbol Ggobi symbol

Description

Usage

.ggobi.symbol(name)

Arguments

name

Details

Used entirely within R to map the given name to the name of the corresponding C routine.

A simple way of generating the prefix for a symbol used in this package/library so that we can hideit from other packages and avoid conflicts.

Value

the name of the C routine corresponding to its argument

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi_version Get version

Description

GGobi version information

Usage

ggobi_version()

Arguments

"glyph_colour<-.ggobiDataset" 23

Details

Return an object that describes the version of the ggobi library being used. This allows code toexecute conditionally on certain version numbers, etc.

@value the release date of the ggobi library @value a vector of 3 integers containing the major, mi-nor and patch-level numbers. @value a string version of the major, minor and patch-level numbers,@keyword dynamic

Valuethe release date of the ggobi library

a vector of 3 integers containing the major, minor and patch-level numbers.

a string version of the major, minor and patch-level numbers,

Author(s)

Hadley Wickham <[email protected]>

Examples

ggobi_version()

"glyph_colour<-.ggobiDataset"Set glyph colour

Description

Set glyph colour

Usage

"glyph_colour<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value vector of new colours

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_colour

24 "glyph_size<-.ggobiDataset"

Examples

glyph_colour.ggobiDatasetGet glyph colour

Description

Get glyph colour

Usage

glyph_colour.ggobiDataset(x)

Arguments

x ggobiDataset

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_colour<-

Examples

"glyph_size<-.ggobiDataset"Set glyph size

Description

Set glyph size

Usage

"glyph_size<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value vector of new sizes

glyph_size.ggobiDataset 25

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_size

Examples

glyph_size.ggobiDatasetGet glyph size

Description

Get glyph size

Usage

glyph_size.ggobiDataset(x, value)

Arguments

x ggobiDataset

value

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_size<-

Examples

26 glyph_type.ggobiDataset

"glyph_type<-.ggobiDataset"Set glyph type

Description

Set glyph type

Usage

"glyph_type<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value vector of new types

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_type

Examples

glyph_type.ggobiDatasetGet glyph type.

Description

Get glyph type.

Usage

glyph_type.ggobiDataset(x)

Arguments

x ggobiDataset

"ids<-.ggobiDataset" 27

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

glyph_type<-

Examples

"ids<-.ggobiDataset"Set row ids

Description

Set row ids from a ggobiDataset

Usage

"ids<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value new values

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

ids

Examples

28 mapGlyphType

ids.ggobiDataset Row ids

Description

Retrive row ids from a ggobiDataset

Usage

ids.ggobiDataset(x)

Arguments

x ggobiDataset

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

ids<-

Examples

mapGlyphType Map glyph type.

Description

Map glyph character code to number

Usage

mapGlyphType(types)

Arguments

types vector of glyph character codes

Details

"names<-.ggobiDataset" 29

Author(s)

Hadley Wickham <[email protected]>

Examples

"names<-.ggobiDataset"Set column names

Description

Set column names for a ggobiDataset

Usage

"names<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value new names

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

names.ggobi GGobi names

Description

Get dataset names

Usage

names.ggobi(x)

Arguments

x

30 names.ggobiDataset

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)names(g)

names.ggobiDataset ggobiDataset column names

Description

Get column names for a ggobiDataset

Usage

names.ggobiDataset(x, ...)

Arguments

x dataset

...

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

ncol.ggobiDataset 31

ncol.ggobiDataset ggobiDataset columns

Description

Retrieve the number of columns in an ggobi dataset

Usage

ncol.ggobiDataset(d)

Arguments

d dataset

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

nrow.ggobiDataset ggobiDataset rows

Description

Retrieve the number of row in an ggobi dataset

Usage

nrow.ggobiDataset(d)

Arguments

d dataset

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

32 print.ggobiDataset

print.ggobi Print ggobi

Description

Prints summary of ggobi object by instance

Usage

print.ggobi(x, ...)

Arguments

x ggobi object

...

Details

Author(s)

Hadley Wickham <[email protected]>

See Also

summary.ggobi

Examples

print.ggobiDataset Print ggobiDataset

Description

Print ggobiDataset

Usage

print.ggobiDataset(x, ...)

Arguments

x GGobi dataset to retrieve

...

"rownames<-.ggobiDataset" 33

Details

By default printing a ggobiDataset acts like printing an R data.frame - ie. show all the data

Author(s)

Hadley Wickham <[email protected]>

Examples

"rownames<-.ggobiDataset"Set row names

Description

Set row names for a ggobiDataset

Usage

"rownames<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value new names

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

34 selected.ggobiDataset

rownames.ggobiDatasetGet row names

Description

Get row names for a ggobiDataget

Usage

rownames.ggobiDataset(x)

Arguments

x ggobiDataget

new names

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

selected.ggobiDatasetGet selection status

Description

Returns logical vector indicating if each point is under the brush

Usage

selected.ggobiDataset(x)

Arguments

x ggobiDataset

logical vector

"[<-.ggobi" 35

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

"[<-.ggobi" [<-.ggobi

Description

Add data to ggobi instance.

Usage

"[<-.ggobi"(x, i, value)

Arguments

x ggobi instance

i name of data frame

value data.frame, or string to path of file to load

Details

This function allows you to add (and eventually) replace ggobi to a ggobi instance.

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi()g["a"] <- mtcarsg$b <- mtcars

36 "[<-.ggobiDataset"

"[<-.ggobiDataset" Assignments for ggobi datasets

Description

Usage

"[<-.ggobiDataset"(x, i, j, value)

Arguments

x row indices

i column indices

j new values

value

Details

This functions allow one to treat a ggobi dataset as if it were a local data.frame. One can extractand assign elements within the dataset.

This method works by retrieving the entire dataset into R, subsetting that copy, and then returningany changes.

@argument ggobi dataset @arguments row indices @arguments column indices @arguments newvalues @keyword manip @keyword internal

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)x <- g["mtcars"]x[1:5, 1:5]x[1:5, 1] <- 1:5x[1:5, 1:5]

"shadowed<-.ggobiDataset" 37

"shadowed<-.ggobiDataset"Set shadowed status

Description

Set the exclusion status of points.

Usage

"shadowed<-.ggobiDataset"(x, value)

Arguments

x ggobiDataset

value logical vector

Details

If a point is shadowed it is drawn in a dark gray colour.

Author(s)

Hadley Wickham <[email protected]>

See Also

shadowed

Examples

shadowed.ggobiDatasetGet shadowed status

Description

Get the exclusion status of points.

Usage

shadowed.ggobiDataset(x)

Arguments

x ggobiDataget

38 summary.ggobi

Details

If a point is shadowed it is drawn in a dark gray colour.

Author(s)

Hadley Wickham <[email protected]>

See Also

shadowed<-

Examples

summary.ggobi GGobi summary

Description

Get a description of the global state of the GGobi session.

Usage

summary.ggobi(object, ...)

Arguments

object ggobi object

...

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)summary(g)

summary.ggobiDataset 39

summary.ggobiDatasetSummarise ggobiDataset.

Description

Summarise a ggobiDataset with dimensions, mode and variable names.

Usage

summary.ggobiDataset(object, ...)

Arguments

object ggobiDataset

...

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

valid_ggobi Determines whether a reference to an internal ggobi object is valid

Description

Usage

valid_ggobi(.gobi)

Arguments

.gobi an object of class ggobi which refers to an internal ggobi instance.

40 variable_index

Details

One can create multiple, independent ggobi instances within a single R session and one can alsoremove them either programmatically or via the GUI. To be able to refer to these objects which areactually C-level internal objects, one has a reference or handle from an S object. Since the C levelobject can be destroyed while the S object still refers to them, this function allows one to checkwhether the internal object to which R refers is still in existence.

@arguments an object of class ggobi which refers to an internal ggobi instance. @value TRUE ifreal object still exist, FALSE otherwise @keyword dynamic

Value

TRUE if real object still exist, FALSE otherwise

Author(s)

Hadley Wickham <[email protected]>

Examples

g <- ggobi(mtcars)valid_ggobi(g)close(g)valid_ggobi(g)

variable_index Variable index

Description

Return indices corresponding to variable names

Usage

variable_index(x, names)

Arguments

x ggobiDataset

names variable names

Details

Author(s)

Hadley Wickham <[email protected]>

Examples

Index

∗Topic attributedim.ggobiDataset, 9dimnames.ggobiDataset, 9names.ggobiDataset, 29ncol.ggobiDataset, 30nrow.ggobiDataset, 30print.ggobiDataset, 31rownames.ggobiDataset, 33summary.ggobiDataset, 38variable_index, 39

∗Topic colorcolorscheme, 6

∗Topic dynamic.GGobiCall, 1.ggobi.symbol, 21clean.ggobi, 4close.ggobi, 4create_time_edges, 7create_time_edges_for_unit, 7excluded.ggobiDataset, 12ggobi, 17ggobi.find.file, 16ggobi_count, 15ggobi_get, 18ggobi_longitudinal, 19ggobi_version, 21glyph_colour.ggobiDataset, 23glyph_size.ggobiDataset, 24glyph_type.ggobiDataset, 25mapGlyphType, 27names.ggobi, 28print.ggobi, 31selected.ggobiDataset, 33shadowed.ggobiDataset, 36summary.ggobi, 37valid_ggobi, 38

∗Topic internal.GGobiCall, 1.ggobi.symbol, 21clean.ggobi, 4create_time_edges, 7create_time_edges_for_unit, 7dataset, 8

dim.ggobiDataset, 9dimnames.ggobiDataset, 9ggobi.find.file, 16ggobi_check_structs, 14ggobi_data_set_variables, 16ggobi_set_data_file, 19ggobi_set_data_frame, 20mapGlyphType, 27names.ggobiDataset, 29ncol.ggobiDataset, 30nrow.ggobiDataset, 30print.ggobi, 31print.ggobiDataset, 31rownames.ggobiDataset, 33valid_ggobi, 38variable_index, 39

∗Topic manipaddVariable.ggobiDataset, 2connecting_edges, 6dataset, 8edges, 11ggobi_data_set_variables, 16ggobi_set_data_file, 19ggobi_set_data_frame, 20ids.ggobiDataset, 27

∗Topic programmingggobi_check_structs, 14

.C, 2

.Call, 2

.GGobiC (.GGobiCall), 1

.GGobiCall, 1

.ggobi.symbol, 21[.ggobi, 17[.ggobiDataset, 17[<-.ggobi, 17[[.ggobiDataset, 17$.ggobiDataset, 17

addVariable(addVariable.ggobiDataset),2

addVariable.ggobiDataset, 2as.data.frame, 17

41

42 INDEX

clean.ggobi, 4close.ggobi, 4colorscheme, 6connecting_edges, 6create_time_edges, 7create_time_edges_for_unit, 7

dataset, 8dim.ggobiDataset, 9dimnames.ggobiDataset, 9

edges, 11, 17edges<-, 17excluded, 12, 17excluded (excluded.ggobiDataset),

12excluded.ggobiDataset, 12excluded<-, 12

ggobi, 17ggobi.find.file, 16ggobi_check_structs, 14ggobi_count, 15ggobi_data_set_variables, 16ggobi_get, 18ggobi_longitudinal, 17, 19ggobi_set_data_file, 19ggobi_set_data_frame, 20ggobi_version, 21glyph_color

(glyph_colour.ggobiDataset),23

glyph_colour, 17, 22glyph_colour

(glyph_colour.ggobiDataset),23

glyph_colour.ggobiDataset, 23glyph_colour<-, 23glyph_size, 17, 24glyph_size

(glyph_size.ggobiDataset),24

glyph_size.ggobiDataset, 24glyph_size<-, 24glyph_type, 17, 25glyph_type

(glyph_type.ggobiDataset),25

glyph_type.ggobiDataset, 25glyph_type<-, 26

ids, 26ids (ids.ggobiDataset), 27

ids.ggobiDataset, 27ids<-, 27

mapGlyphType, 27

names.ggobi, 28names.ggobiDataset, 29ncol.ggobiDataset, 30nrow.ggobiDataset, 30

print.ggobi, 31print.ggobiDataset, 31

rownames.ggobiDataset, 33

selected (selected.ggobiDataset),33

selected.ggobiDataset, 33shadowed, 17, 36shadowed (shadowed.ggobiDataset),

36shadowed.ggobiDataset, 36shadowed<-, 37summary.ggobi, 31, 37summary.ggobiDataset, 38

valid_ggobi, 38variable_index, 39


Recommended