Learn R Programming

RnavGraph (version 0.1.8)

navGraph: Start an navGraph session

Description

navGraph is an interactive data visualization program that lets the user explore high dimensional data by using graphs as a "road map". That is, navGraph connects a bullet on a graph to some user specified visualization of some data.

The package is discussed in detail in our vignette, see vignette("RnavGraph").

Usage

navGraph(data, graph = NULL, viz = NULL, settings = NULL)

Arguments

data
a single- or a list of objects generated by the ng_graph function. I.e. objects from the NG_data class. Two special cases are: - either a navGrah handler to reinitialize a navGraph session. - or the sting tclreset to delete tk2d related settings and data.
graph
a single- or a list of objects generated by the ng_graph function. I.e. objects from the NG_data class.
viz
a single- or a list of visualization instruction objects generated for example by ng_2d or ng_2d_myplot function. I.e. objects from the NG_visualization class.
settings
a list of pailists. See details.

Value

navGraph session via the R prompt. Use ng_get-methods to get data from the function.Use ng_update to update the navGraph handler with the current state of its associated navGraph session. If you have changed some attributes such as color or size in the tk2d display, you can get the new grouping with ng_get(ng_get(nav,"data"),"group") back, where nav is the navGraph handler.

Details

The RnavGraph package comes with an extensive package vignette which we encourage to read. navGraph is capable to handle multiple graphs where each graph can be connected to multiple data displays.

navGraph needs to know the data to be explored, the graph whose node represent some low dimensional visualization of the data and some visualization instructions which connect the graph and data. Data, graph and visualization instruction have their own wrapper class provided by the RnavGraph package. See ng_data, ng_graph and for the visualization instructions ng_2d.

There are several shortcuts to start a navGraph session. All of them assume that the nodes of the graphs represent 2d scatterplots and the edges 3d rigid rotation or a 4d transition of one scatterplot into another. The easiest of them is to only pass by a data object created with the ng_data function. For the other ways consult the vignette.

The settings argument modifies the default appearance and interaction properties of the navGraph user interface. It must be a list of named (names are: color, interaction, display and tk2d) lists containing tag=value pairs. To get the possible tag=value options, study the class definitions of the ColorSettings, InteractionSettings, DisplaySettings and Tk2dDisplay classes with the getClassDef function. See the examples section below for an example.

See Also

ng_data, ng_graph, ng_2d, ng_2d_myplot, scagNav, ng_get-methods, ng_set-methods, ng_update, ng_walk, ng_set_color<-, ng_get_color, ng_set_size<-, ng_get_size

Examples

Run this code
## Define a NG_data object
ng.iris <- ng_data(name = "iris", data = iris[,1:4],
		shortnames = c('s.L', 's.W', 'p.L', 'p.W'),
		group = iris$Species,
		labels = substr(iris$Species,1,2))

## Start navGraph
nav1 <- navGraph(ng.iris)

## navGraph session, data linked to previous session
nav2 <- navGraph(ng.iris, settings =
   list(color=list(background="steelblue",bullet="blue"),
   interaction=list(NSteps=11)))

## navGraph session, data is not linked
nav3 <- navGraph(ng.iris, settings=list(tk2d=list(linked=FALSE)))



Run the code above in your browser using DataLab