Skip to content

Commit

Permalink
version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
waddella authored and gaborcsardi committed Jun 2, 2011
1 parent 53a1250 commit 7f3924e
Show file tree
Hide file tree
Showing 21 changed files with 629 additions and 30 deletions.
9 changes: 4 additions & 5 deletions DESCRIPTION
@@ -1,13 +1,12 @@
Package: RnavGraph
Type: Package
Title: Using graphs as a navigational infrastructure.
Version: 0.0.9
Version: 0.1.0
Date: 2011-06-02
Author: Adrian R. Waddell and R. Wayne Oldford
Maintainer: Adrian Waddell <adrian@waddell.ch>
Url: http://adrian.waddell.ch/
Description: GUI to explore high dimensional data (including image
data) using graphs as navigational infrastructure.
Description: GUI to explore high dimensional data (including image data) using graphs as navigational infrastructure.
License: GPL-2
Suggests: PairViz, scagnostics, rgl, grid, MASS, rggobi, RGtk2, hexbin,
RDRToolbox, vegan, RnavGraphImageData
Expand All @@ -20,6 +19,6 @@ Collate: 'AllGenerics.R' 'ng_data.R' 'ng_graph.R' 'ng_path.R'
'Viz2D_Ggobi.R' 'Viz2D_Axis.R' 'Viz2D_tk2d.R'
'FunctionNavGraph.R' 'graphtools.R' 'navGraph.R' 'scagNav.R'
'zzz.R'
Packaged: 2011-06-11 04:18:46 UTC; adrian
Packaged: 2011-11-20 18:54:55 UTC; adrian
Repository: CRAN
Date/Publication: 2011-06-15 17:53:43
Date/Publication: 2011-11-21 08:06:16
117 changes: 117 additions & 0 deletions MD5
@@ -0,0 +1,117 @@
3fabbdd1df81c015e0dfd57327f61582 *DESCRIPTION
50e6aceaaa33f68dcec63bd0ed69a5d8 *NAMESPACE
166d6e8214d47c77e54e76068ae13bbe *NEWS
975561750ebf517d442103758808f5a2 *R/AllGenerics.R
3a89d7085371482989bccc875f252add *R/FunctionNavGraph.R
698183f7c8d7f656c8bda9b23251958c *R/GraphDisplay.R
f9a01a193c02ca5efb88ba0d1fd59177 *R/NavGraphHandler.R
ac0fed0cfde2f72b087b418fa6329b6d *R/SettingClasses.R
8649cdcb75fe57d033c1d101f23fc3a2 *R/Visualization.R
af44c988350f0246a2168dffd1b8f42c *R/Visualization2D.R
d4b275be83045e7a2f8c998325e04a42 *R/Viz2D_Axis.R
f7826c4d8da66784814b901cb4ddd5b5 *R/Viz2D_Ggobi.R
b8456e92af433a96f13c7d1592c320fd *R/Viz2D_tk2d.R
61f8b9c6b01a6ebe5c5c0da86e9fbd37 *R/graphtools.R
1d324dce1bbb0900483dee3c081c4197 *R/navGraph.R
e2046071e11a654375f749ae3f73a299 *R/ng_data.R
341f0517b37a67c8a4f3a8f23e910459 *R/ng_graph.R
b329d41fa64771577a44a16fadf604a7 *R/ng_image.R
a99f1c3a3c7c5bab62790b432ad4e06c *R/ng_path.R
2df6ec796522c5881afa798e4091d435 *R/scagNav.R
59e83261e9e85cde03449fcdb1f6e190 *R/zzz.R
05fa39a7aa4a291f0106a0d5c0f1af5f *data/olive.rda
8e3052319f6b637047d582b58e563930 *demo/00Index
f6bed440461ba5b5119b13ea84486afe *demo/ng_2d_image_files_aloi.R
e32ad4ffe3e274a54bf0120920479a26 *demo/ng_2d_images_alpha_letter.R
f4b98a0bd069bbf827c78a1f221b4c1b *demo/ng_2d_images_digits.R
53262c5dacf3564615aa5a47cd2f922b *demo/ng_2d_images_faces.R
139ed49a1da01f06f8e27e0a89b68604 *demo/ng_2d_images_frey_LLE.R
e135d2e8e8778349152b43791061f99a *demo/ng_2d_images_frey_isomap.R
6e0365b1890e7751b186ae8a3f03f1bc *demo/ng_2d_images_iris.R
a6063096388596733f09308dbc40af2f *demo/ng_2d_iris.R
75b19e759806c0340e3a1b9a8b3f162a *demo/ng_2d_myplot_base.R
e6195073c4c1053f62f75299ab46dc34 *demo/ng_2d_myplot_grid.R
78048726ee7ae7c27f501e495bf11044 *demo/ng_2d_myplot_hexbin.R
89f25eb6eaf0221bbc0bd3428111583d *demo/ng_2d_myplot_rgl.R
19090a35be406de6dc437fef90388679 *demo/ng_2d_olive.R
893374fbe4c8212a0239feb08c2cdaaa *demo/ng_2d_scagnostics_olive.R
565ba3355ffdd2649490f106a444f7e1 *inst/doc/RnavGraph.Rnw
bc8885aa91311a35514df31fec4330e9 *inst/doc/RnavGraph.pdf
878bc5d97e8fc74bcd1c30ecfee54ac4 *inst/doc/img/Iris2D.png
477b04aa2ae7bae02581a52b705518f3 *inst/doc/img/Iris3Dgraph.png
cd30f1a534564bf00f5c4cf266f8ec7b *inst/doc/img/all.png
009b8efae8b69597b198849bfcb93554 *inst/doc/img/aloi.jpg
6550c8c81e544a37def56fb9a323f2c7 *inst/doc/img/f1_1.png
1f7ed692604c2607304d03894150b02f *inst/doc/img/f1_2.png
6c7a5413dc5235a93d922c01c3d41a80 *inst/doc/img/f2_1.png
46ea8aa7c6fd8690a6e4825577fae793 *inst/doc/img/f2_2.png
22d80a8c8cfc0cb0415ef8c8ec64ff9e *inst/doc/img/ggobicolors.png
e85e39f0c1b31174122301a7ebf530dd *inst/doc/img/graph.eps
65578f85a79af4fee98a76464e1328ab *inst/doc/img/graph.png
b1e6188270d3e23696fa39eb03f83d93 *inst/doc/img/imageDigits.png
25c8907faab1358cdd0009ddd7141303 *inst/doc/img/m1_1.png
0a1e7bdc76999567e86815d11dbe081b *inst/doc/img/m1_2.png
7343d5059fdf3a0b7f10bf6d08ef2fc0 *inst/doc/img/m2_1.png
401e400fdc0dbdc1bfbfb372df2f13c6 *inst/doc/img/m3_1.png
4593ccbe6481fce1ac3f88a656b723a8 *inst/doc/img/m4_1.png
1ee7ea1c187f556aa4f5cb25c6476bb7 *inst/doc/img/m4_2.png
fc413f742ddf8b23403a83ace580cf23 *inst/doc/img/tk2dGlyphs.png
e013f0b9593f0719daaa6f1d4021b8e4 *inst/doc/img/tk2dImagesObject.png
d375579ac402230f63022b6c4c175d84 *inst/doc/img/tk2dcolors.png
da4df93cb36f339047580637e3cb2e03 *inst/doc/img/tk2dcolors2.png
e779e463f7a934c1bdb9915ec1fe86c7 *inst/doc/img/tk2dimages1.png
43fad6779d744553274c9bf95c1833c8 *inst/doc/lg.tex
e13b04983886f49dac831bda2cba3aa2 *inst/doc/p_prod.tex
dd48da26f924e1d4d2653d3105578d84 *inst/doc/products.tex
4b6a83fceb0a46bd44a28412e738589e *inst/doc/rep_p_GLG.tex
dc58885a2f671bc0d1584f82463777cd *inst/doc/temp.tex
2c834ba48bb44cb8c139d56a17c6a8c4 *inst/doc/tikz_animation.tex
aafd56543b925aed202d49f92d882273 *inst/doc/tikz_drag.tex
cc550adbced477dcddcbea1f5437a6b9 *inst/doc/tikz_edgeSelect.tex
3b3f4674b263a815e75f0e6a66d18852 *inst/doc/tikz_modifyGraph.tex
28d4af98c9a46f85b9261de3ca6029ea *inst/doc/tikz_tk2d_main.tex
d0c5c9a08c6b1dcb3ac39801d14d9a44 *inst/doc/tikz_walk.tex
b32561c5cecdc451ee9a893f3efecd4b *inst/tcl/GraphDisplay.tcl
ffbe67dcab0a0c7cf371524ffcba5a4d *inst/tcl/tkScatterplotV1.tcl
36bf58d5a6e240cc9f7c6cf6416141ab *inst/tcl/tkScatterplotV3.tcl
fcf942d65d03b25a11106409c14af668 *man/RnavGraph-package.Rd
16a162c79bcfcde2903c1a68051cf96b *man/completegraph.Rd
fec7fc31e3554fea6c084b41c91277a6 *man/linegraph-methods.Rd
e12bacf23993c4833cf2f18e24fa523f *man/linegraph.Rd
23fc1cc5fa7dc02e4cba238cf144d005 *man/names-methods.Rd
38a60dbc8e21d85817b9ce7d57619320 *man/names_--methods.Rd
4f30ddd754eabc93b3f423c3ae0a284c *man/navGraph.Rd
d1e5a26329255ab09350455bf564df86 *man/newgraph.Rd
7e65acf87c8f2357390d56ad9f37e7f2 *man/ng_2d.Rd
6c28f11a17a694079ce4e0d39fd20b76 *man/ng_2d_ggobi.Rd
a5838afd4e173f7121e5bf31f6083f0a *man/ng_2d_myplot.Rd
b5c08002bfbfdba97498e78eadca32af *man/ng_data.Rd
d4310a641fd37505e797859ebaddcf65 *man/ng_get-methods.Rd
46bcfe38db2ce45e6a4aad4be55c442d *man/ng_get.Rd
462aa6fa34bc2537fcceb117c956b788 *man/ng_get_color.Rd
459f7e41b814eb569a60422c9b0c5dc2 *man/ng_get_size.Rd
660f632845fd22518261a9fd94e943a4 *man/ng_graph.Rd
1fc37c2723c40c681ff1863056c21a1e *man/ng_image_array_gray.Rd
39ab18bf9f8fcbeff35868994a5f8796 *man/ng_image_files.Rd
c4adb6b9a195636bd632ac7d9f98ffa2 *man/ng_set-methods.Rd
20eca46584cd0f5fdd3fa813afc74eff *man/ng_set.Rd
a18077f974df647145afbc7b7be162ff *man/ng_set_--methods.Rd
5a778a47bffaa80d1b14abb1dc81837f *man/ng_set_color_--methods.Rd
e7f2e37780f69804800bf24df4f60407 *man/ng_set_colorsetter.Rd
eb5cc7203ef6e31da1ac058b6be5f405 *man/ng_set_size_--methods.Rd
54a4889c51d158d2e449b2c2d6b8d972 *man/ng_set_sizesetter.Rd
41cf0b2979793d8723fbf6327e3fd8d0 *man/ng_setsetter.Rd
fd830993143b83dc528b652468fb0ef3 *man/ng_update.Rd
bdf78bafb92240d4cc24ff5bbf26ebe0 *man/ng_walk.Rd
28ccdf988d3266fda946af0b3194b1ce *man/olive.Rd
fe46843f601c2ada07f6cf3f5323e580 *man/plot-methods.Rd
9ded80e93764dc7ac61e3791ab3d3419 *man/scagEdgeWeights.Rd
af1140459efe391285be1eff17bb98d0 *man/scagGraph.Rd
69f6d1ec6b0bfbbbfdd34b518406a59f *man/scagNav.Rd
634f5e9a30cd2a7304ace56f83e4b7cd *man/shortnames-methods.Rd
13495c077cf5f60c74ce6338a5c7b500 *man/shortnames.Rd
4f10aaa642791491f9f5682292a5bc22 *man/shortnames_--methods.Rd
1527379a32776e5ad9114d4eaa2ebb60 *man/shortnamessetter.Rd
fed9c5a7460a05800eabd118db8fc5f3 *src/Makevars
5a0116afd444d3d14245405f57f6f379 *src/display_stuff.c
c6976d3548df7b5c048cdb5924166d8f *src/image_scale.c
6 changes: 5 additions & 1 deletion NAMESPACE
Expand Up @@ -23,12 +23,16 @@ importFrom(RBGL,kamadaKawaiSpringLayout,fruchtermanReingoldForceDirectedLayout)
scagNav,
scagGraph,
scagEdgeWeights,
plot
plot,
ng_get_color,
ng_get_size
)
#exportPattern("^ng_")

export(shortnames, "shortnames<-")
export(ng_get,"ng_set<-", ng_set)
export("ng_set_color<-")
export("ng_set_size<-")


## ng_graph
Expand Down
5 changes: 5 additions & 0 deletions NEWS
@@ -0,0 +1,5 @@
New to Version 0.1.0
--------------------

* new functions/methods: ng_get_color, ng_set_color<-, ng_get_size, ng_set_size<-
* color choosers open now centered over their parent windows
8 changes: 7 additions & 1 deletion R/AllGenerics.R
Expand Up @@ -20,6 +20,12 @@ setGeneric(name = "ng_get",
setGeneric(name = "ng_set<-",
def = function(object,what,value){standardGeneric("ng_set<-")})

setGeneric(name = "ng_set_color<-",
def = function(obj,dataName,value){standardGeneric("ng_set_color<-")})

setGeneric(name = "ng_set_size<-",
def = function(obj,dataName,value){standardGeneric("ng_set_size<-")})

setGeneric(name = "ng_set",
def = function(object){standardGeneric("ng_set")})

Expand Down Expand Up @@ -56,4 +62,4 @@ setGeneric(

setGeneric(
name = "closeViz",
def = function(viz,ngEnv){standardGeneric("closeViz")})
def = function(viz,ngEnv){standardGeneric("closeViz")})
147 changes: 147 additions & 0 deletions R/NavGraphHandler.R
Expand Up @@ -205,3 +205,150 @@ setReplaceMethod(
return(tmp)
}
})


## ng_get_color
ng_get_color <- function(obj, dataName) {

if(!is(obj, "NavGraph_handler")) {
stop('[ng_get_color]: first arguments needs to be a NavGraph_handler object')
}

dnames <- sapply(obj@data, function(x)x@name)

isMissing <- FALSE
if(missing(dataName)) {
if(length(obj@data) > 1) {
cat("Specify data name. Choose from:\n")
cat(paste(' ', paste(sapply(obj@data, function(x)x@name), collapse = ', '), '\n'))
isMissing <- TRUE
} else {
dataName <- dnames[1]
}
} else {
## does dataName exist
if(!(dataName %in% dnames)) {
stop(paste('[ng_get_color]: data name "',dataName,'" does not exist in your NavGraph_handler', sep=''))
}
}

if(!isMissing) {
return(as.character(tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','color','")',sep = ''))))
}

}


setReplaceMethod(
f = "ng_set_color",
signature = signature(obj = "NavGraph_handler"),
function(obj,dataName,value){

dnames <- sapply(obj@data, function(x)x@name)

isMissing <- FALSE
if(missing(dataName)) {
if(length(obj@data) > 1) {
cat("Specify data name. Choose from:\n")
cat(paste(' ', paste(sapply(obj@data, function(x)x@name), collapse = ', '), '\n'))
isMissing <- TRUE
} else {
dataName <- dnames[1]
}
} else {
## does dataName exist
if(!(dataName %in% dnames)) {
stop(paste('[ng_get_color]: data name "',dataName,'" does not exist in your NavGraph_handler', sep=''))
}
}

if(!isMissing){
## where is the data stored
ind <- match(dataName,dnames)[1]
n <- dim(obj@data[[ind]]@data)[1]

if(length(value) == 1) {
tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','color','")',sep = ''), rep(value, n))
} else if(length(value) == n) {
tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','color','")',sep = ''), value)
} else {
stop('[ng_set_color]: length of specified color vector does not match with data dimension')
}
tcl('refresh_linked', obj@env$ng_LinkedInstance, dataName)
}
return(obj)
})



## ng_get_size
ng_get_size <- function(obj, dataName) {

if(!is(obj, "NavGraph_handler")) {
stop('[ng_get_color]: first arguments needs to be a NavGraph_handler object')
}

dnames <- sapply(obj@data, function(x)x@name)

isMissing <- FALSE
if(missing(dataName)) {
if(length(obj@data) > 1) {
cat("Specify data name. Choose from:\n")
cat(paste(' ', paste(sapply(obj@data, function(x)x@name), collapse = ', '), '\n'))
isMissing <- TRUE
} else {
dataName <- dnames[1]
}
} else {
## does dataName exist
if(!(dataName %in% dnames)) {
stop(paste('[ng_get_color]: data name "',dataName,'" does not exist in your NavGraph_handler', sep=''))
}
}

if(!isMissing) {
return(as.numeric(tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','size','")',sep = ''))))
}

}


setReplaceMethod(
f = "ng_set_size",
signature = signature(obj = "NavGraph_handler"),
function(obj,dataName,value){
dnames <- sapply(obj@data, function(x)x@name)

isMissing <- FALSE
if(missing(dataName)) {
if(length(obj@data) > 1) {
cat("Specify data name. Choose from:\n")
cat(paste(' ', paste(sapply(obj@data, function(x)x@name), collapse = ', '), '\n'))
isMissing <- TRUE
} else {
dataName <- dnames[1]
}
} else {
## does dataName exist
if(!(dataName %in% dnames)) {
stop(paste('[ng_get_color]: data name "',dataName,'" does not exist in your NavGraph_handler', sep=''))
}
}

if(!isMissing){
## where is the data stored
ind <- match(dataName,dnames)[1]
n <- dim(obj@data[[ind]]@data)[1]

if(length(value) == 1) {
tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','size','")',sep = ''), rep(value, n))
} else if(length(value) == n) {
tcl('set',paste('ng_data("',obj@env$ng_LinkedInstance,'.',dataName,'.','size','")',sep = ''), value)
} else {
stop('[ng_set_color]: length of specified color vector does not match with data dimension')
}
tcl('refresh_linked', obj@env$ng_LinkedInstance, dataName)
}
return(obj)
})

0 comments on commit 7f3924e

Please sign in to comment.