theTreeTkArvore {ArvoRe} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
theTreeTkArvore(TheTree)
TheTree |
~~Describe TheTree here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function(TheTree) { num.lin <- dim(TheTree)[1] num.levels <- max(TheTree$Level) for (i in 1:length(.libPaths())) { SubDataSet <- subset(TheTree, Level == 1) osnodos <- SubDataSet$Node.N osnodosnomes <- SubDataSet$Node.name osnodostipos <- SubDataSet$Type osnodos <- paste(i,".",osnodos,sep="") icon.but <- file.path(paste(.libPaths()[i],"/arvoRe/icons/", osnodostipos,".png",sep="")) if (file.exists(icon.but)) { icn <- tkimage.create("photo", file=icon.but) tkinsert(treeWidget,"end","root","1.1",text=osnodosnomes, image = icn) } else { tkinsert(treeWidget,"end","root","1.1",text=osnodosnomes) } } if (num.lin > 1) { for (i in 2:num.levels) { SubDataSet <- subset(TheTree, Level == i) osnodos <- SubDataSet$Node.N paisnodos <- SubDataSet$Father osnodosnomes <- SubDataSet$Node.name osnodostipos <- SubDataSet$Type # cat("DEBUG : Criei os nodos \n ", osnodos, " cujos pais são ", paisnodos, "\n") osnodos <- paste(i,".",osnodos,sep="") paisnodos <- paste((i-1),".",paisnodos,sep="") for (j in 1:length(osnodos)) { tipofilename <- osnodostipos[j] for (i in 1:length(.libPaths())) { icon.but <- file.path(paste(.libPaths()[i],"/arvoRe/icons/", tipofilename,".png",sep="")) if (file.exists(icon.but)) { icn <- tkimage.create("photo", file=icon.but) tkinsert(treeWidget,"end",paisnodos[j],osnodos[j],text=osnodosnomes[j], image = icn) } else { tkinsert(treeWidget,"end",paisnodos[j],osnodos[j],text=osnodosnomes[j]) } } } } } }