[rkward-devel] Introduction, proposing a HC plugin and may be a bug report

Jose Maria Polo josemariapolo at gmail.com
Thu Nov 25 08:35:39 UTC 2010


Hi everybody,

First of all, thank you so much for creating such a great tool.
My name is Jose, I am biochemist and I have using R and Rkward 
sporadically. I try to use Rkward whenever I can, since I found R too 
encrypted, however I acknowledge it power.
I am sending an email to the developing team since I realized that there 
are some plot types that my colleges and my self use all the time and it 
will be good to add them to Rkward.
The first one that I would like to propose is hierarchical clustering (HC).

A simple HC, basically a front end for hclust (transposing the data (d) 
and generating a distance matrix (dist) will be necessary first).
 > t.r = t(data)
 > dist.tr = dist(t.r)
 > hc.tr = hclust(dist.tr, method = "average")
 > plot(hc.tr, hang = -1)

Another approach could be to call pvclust, which it calculates something 
similar. However it also gives p values.
 > result <- pvclust(data, method.dist="cor", method.hclust="average", 
nboot=1000)
 > plot(result)

What do you think?

Anyway, I am not writting to just make a suggestion. I would like to 
help as much as I can with this, even if I never have program anything. 
I already started reading the information about how to generate a plugin.
As suggested in your plugin webpage, I guess that the best way will be 
to start modifying a plugin that has a similar role.
Ideally should be a pluggin that allows to compare as many variables as 
we want (I was thinking to use the boxplot plugin, but I realized that 
the boxplot plugin use many variables, but all separated).
Any idea or suggestions?

2) I am not sure if I should report this here, but I think that I found 
a bug, when I try to use basic statistic the "submit" botton does not 
turn on. The code is generated, I can copy and paste it in the R console 
and when I hit enter I get the result in the Output window.

I am using:Version 0.5.4,Using KDE Development Platform 4.5.1 (KDE 
4.5.1). In a LinuMint 10 box.

OK, thats it for the moment, thanks again for all what you have done!! I 
hope that with your help, I can make my little contribution and sorry 
for the long email.

Kind regards
Jose

PS:
Here is an example of the generated code for the Basic statistic:

local({
## Prepare
## Compute
vars <- list (substitute (my.data[["var"]]))
results <- data.frame ('Variable Name'=rep (NA, length (vars)), 
check.names=FALSE)

for (i in 1:length (vars))  {
     var <- eval (vars[[i]], envir=globalenv());
     results[i, 'Variable Name'] <- rk.get.description(vars[[i]], 
is.substitute=TRUE)

     results[i, 'Mean'] <- mean(var,na.rm=TRUE)
     results[i, 'Variance'] <- var(var,na.rm=TRUE)

     #robust statistics
}

## Print result
rk.header ("Univariate statistics", parameters=list (
"Remove Missing values", TRUE))

rk.results (results)
})

-- 
Jose Maria Polo, Ph.D.

Massachusetts General Hospital Center for Regenerative Medicine
Harvard Stem Cell Institute

185 Cambridge Street CPZN 4200
Boston MA 02114
617-643-5941 (tel)
617-643-3170 (fax)
polo.josemaria at mgh.harvard.edu
josemariapolo at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20101125/5daaeb16/attachment.html>


More information about the Rkward-devel mailing list