Displaying 20 results from an estimated 1000 matches similar to: "Creating dendrograms from a table"
2007 Feb 05
0
Help with party package
I am just starting to experiment with the party package and I am getting
strange results. In the examples, the "statistic" and "criterion" seem
related, i.e. criterion is a 1-p.value and statistic is the test
statistic. Higher statistics are associated with higher criteria
values. When I run these models on my own dataset, the highest
statistic ends up getting a 0.00
2011 May 19
2
Anyone successfully install Rgraphviz on windows with R 2.13?
I have been trying to get Rgraphviz to work (I know it is from Bioconductor) unsuccessfully. Since I have no experience with Bioconductor I thought I would ask here if anyone has advice. I have installed Graphviz 2.20.3 as is recommended on the Bioconductor site but basically R cannot seem to find the needed dll files. So, even though I have added the appropriate directories to the system path R
2009 Dec 03
3
Scraping a web page
I would like to be able to submit a list of URLs of various webpages and extract the "content" i.e. not the mark-up of those pages. I can find plenty of examples in the XML library of extracting links from pages but I cannot seem to find a way to extract the text. Any help would be greatly appreciated - I will not know the structure of the URLs I would submit in advance. Any
2009 Aug 19
2
Problem with predict.coxph
We occasionally utilize the coxph function in the survival library to fit multinomial logit models. (The breslow method produces the same likelihood function as the multinomial logit). We then utilize the predict function to create summary results for various combinations of covariates. For example:
2006 Jun 01
1
Help with evaluation of expressions
Hello all:
I have searched through the help files and I have been unsuccessful in
solving this problem.
I am trying to create a small wrapper function that will go around a
call to a plot function and create a windows metafile in the directory
and also write the name of the file to a text file. The purpose is to
efficiently bring a large number of plots into powerpoint. I am using
2010 Dec 29
3
Windows editor suggestions - autosave
I am looking for advice on an editor to use with R (windows) that has an autosave feature. I typically write scripts using the RGui (and tried TinnR yesterday) but I am having continuing problems with BSODs (non R related) and have in the past have had issues with R crashes and would really like a system that does not require me to remember to hit the save button on my script every 10 minutes so
2009 Apr 28
1
Problem with Random Forest predict
I am trying to run a partialPlot with Random Forest (as I have done many times before).
First I run my forest... Cell is a 6 level factor that is the dependent variable - all other variables are predictors, most of these are factors as well.
predCell<-randomForest(x=tempdata[-match("Cell",names(tempdata))],y=tempdata$Cell,importance=T)
Then I try my partial plot to look at the
2011 Jun 01
0
Memory management
I am trying to run a very large Bradley-Terry model using the BradleyTerry2 package. (There are 288 "players" in the BT model).
My problem is that I ran the model below successfully.
WLMat is a win-loss matrix that is 288 by 288
WLdf<-countsToBinomial(WLMat)
mod1<-BTm(cbind(win1,win2),player1,player2,~player,id="player",data=WLdf)
Then I needed to run the same model
2006 Mar 08
1
Accessing functions in a library
I am trying to write a modified function to plot an rpart object. By
using getS3method I can see the plot and text code that I want to
modify. Since I don't want to modify the package, I create a new
function to plot the rpart object. The problem is that the original
function calls many rpart specific functions that are only visible
inside the rpart namespace. Therefore, when I call my
2008 Jun 25
1
LDA on pre-assigned training and testing data sets
Dear r-help
I am trying to run LDA on a training data set, and test it on another data set with the same variables. I found examples using crossvalidation, and using training and testing data sets set up with sample, but not when they are preassigned.
Here is what I tried
# FIRST SET UP A DATAFRAME WITH ALL THE DATA AND CREATE NEW VARIABLES
traintest1 <-
2007 Sep 07
2
confusion matrix - better code?
Hi,
I’ve written some code to obtain a confusion matrix when the true classification and the predicted classification are known. Suppose true classification is called “tr” and predicted classification is “pr”. I have 4 classes in tr, but only 3 classes out of 4 are predicted in “pr”. Following is my code, but looks quite “clunky” to me. I wonder if you have any suggestions to improve it.
2008 May 23
3
Percentages for categorical data by group
I can think of several ways to blunt force hard code what I want but I
imagine there is a command or two that can be easily combined to do this:
I have a data frame with about 23000 observations. There first variable is
the group to which the observation belongs (about 500 different groups). The
second variable is a response for each observation that is a 1,2,3,4 or 5. I
want to be able to
2008 Jun 06
5
request: a class having max frequency
Dear R users
I have a very basic question. I tried but could not find the required result. using
dat <- pima
f <- table(dat[,9])
> f
0 1
500 268
i want to find that class say "0" having maximum frequency i.e 500. I used
>which.max(f)
which provide
0
1
How can i get only the "0". Thanks and
best regards
Muhammad Azam
Ph.D. Student
Department of
2012 Apr 03
0
dendrogramGrob cuts off dendrograms (latticeExtra)
Hi,
I'm using the latticeExtra package's dendrogramGrob function to create a grob with both a dendrogram and a covariate bar (via the 'add' parameter). When the dendrogram has very short branches at its leaves, it appears as a line and becomes impossible to see when placed next to the covariate bar.
For example:
> x <- outer(-5:5, -5:5, "*") + matrix(nrow = 11,
2010 Feb 21
1
How to: Compare Two dendrograms (Hierarchical Clusterings) ?
Hello all,
I wish to compare two dendrograms (representing Hierarchical Clusterings).
My problems are several:
1) how do I manually create a dendrogram object ?
That is, how can I reconstruct it as an "hclust" object that creates such a
dendrogram, when all I have is the dendrogram image (but don't have the
underlaying distance matrix that produced it) ?
I see that there is a
2010 Jun 17
1
plotting radial dendrograms
Dear list,
I am trying to plot a radial dendrogram using the ape package, which
requires my data to be of class 'phylo'. Currently I have my
dendrogram stored as an object of class 'dendrogram' which was
produced from an outside bit of C code, but was made into an object of
class 'igraph.eigenc' and converted to a dendrogram using
'as.dendrogram()' from the igraph
2005 Jul 11
1
indexing into and modifying dendrograms
I would like to be able to exert certain types of control over the
plotting of dendrograms (representing hierarchical clusterings) that I
think is best achieved by modifying the dendrogram object
prior to plotting. I am using the "dendrogram" class and associated
methods.
Define the cluster number of each cluster formed as the corresponding
row of the merge object. So, if you are
2002 Mar 05
1
no labels when plotting dendrograms
I'd like to be able to cut dendrograms at a height I specify
and then plot the resulting subtrees. I wanted to use the
dendrogram object for this purpose because there doesn't seem
to be a canned way to cut a hclust object and get a list of
hclust objects, but there is a function (cut) that does that
for dendrograms. The problem I'm having is that when I plot
a dendrogram, I
2004 Dec 15
1
hclust and heatmap - slightly different dendrograms?
Good afternoon,
I ran heatmap and hclust on the same matrix x (strictly, I ran
heatmap(x), and hclust(dist(t(x))), and realized that the two
dendrograms were slightly different, in that the left-right
arrangement of one pair of subclusters (columns) was reversed in the
two functions (but all individual columns were grouped correctly).
Looking through the code for heatmap as a most definite
2008 Jun 02
1
Plotting horizontal dendrograms
I am using hclust and plot to produce dendrograms. Using my input data I am
able to complete an analysis and obtain a vertical plot.
I want to be able to plot the dendrogram horizontally.I am using version 2.6
of R and have updated my packages recently.
Using the sample script for dendrograms I can produce a horizontal plot
using the instruction horiz = TRUE in plot().
When I use the same