Displaying 20 results from an estimated 38 matches for "tim_smith_666".
2008 Dec 05
2
xtable html links
Hi,
I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks to function properly. For example, if I use
## Try to link NY times website to every figure in column 4
mat <- matrix(1:43,6,5)
mat[,5] <- "http://nytimes.com"
for(i in 1:nrow(mat)){
strr <- paste('<a href="', mat[i,5],'">', mat[i,4], '</a>',
2009 Nov 17
2
Lattice plot
Hi,
I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols):
chr start1 end1 meth positive
1 1 10 20 1.5 y
2 2 12 18 -0.7 n
3 3 22 34 2.0 y
4 1 35 70 3.0 y
5 1 120 140 -1.3 n
6 1 180 190 0.2 y
7 2 220 300 0.4 y
I wanted the panels to be organized by 'chr' -
2009 Sep 24
1
col headers in read.table()
Hi,
I was trying to read in a file test.txt, which has the following data:
norm norm norm class class class
a 1 2 3 4 5 6
b 3 4 5 6 7 8
c 5 6 7 8 9 10
in my R code, I do the following:
---------------------------------------------------
> mat <- read.table('test.txt',header=T,row.names=1,sep='\t')
> mat
norm norm.1 norm.2 class class.1 class.2
a 1 2 3
2010 Mar 20
1
abline on heatmap
Hi,
Is there a way I can draw an abline on a heatmap? I try the abline function, but don't get the line. My sample code is:
mat <- matrix(sample(1:100,40),nrow=5)
heatmap(mat,col=greenred(75),trace="none",
dendrogram = "column",labCol = NULL)
abline(h=5,v=4)
thanks!
[[alternative HTML version deleted]]
2010 Jul 26
1
Outlier detection in bimodal distribution
Hi,
I was looking for a package that would help with outlier detection for bimodal
distributions. I have tried 'outliers' and 'extremevalues' packages, but am not
sure if they are ok for bimodal distribution.
Any help would be highly appreciated!
thanks,
[[alternative HTML version deleted]]
2011 Jan 23
1
Passing formula as an agrument
Hi,
I had a function that looked like:
diff <- lm(x ~ y + z)
How can I pass the argument to the 'lm' function on the fly? E.g., if I pass it
in as a string (e.g. "x ~ y + z"), then the lm function treats it as a string
and not a proper argument.
many thanks
[[alternative HTML version deleted]]
2006 Apr 27
1
scope of variable/object ?
Hi,
I must be missing something here...Essentially, a short piece of code works if it's standalone, but doesn't work if it's divided into two functions.
The code that works is:
################### WORKS ###############
library(pamr)
set.seed(120)
x <- matrix(rnorm(1000*20),ncol=20)
y <- sample(c(1:4),size=20,replace=TRUE)
mydata <- list(x=x,y=y)
2006 Apr 09
2
adding a row to a matrix
Hi All,
This is probably a very simple question. I was trying to add a row to the rows in a matrix. For example:
> a <- matrix(1:6,2,3)
>
> b <- a[1,]
>
> print(a)
[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6
>
> print(b)
[1] 1 3 5
I now want to add 'b' to every row of 'a', so the end result should look like:
[,1]
2011 Sep 08
1
ggplot2 freqpoly() layers..?
Hi,
I was trying to overlay/combine two freqpoly plots. The sample code below illustrates the problem. Essentially, I want to do is:
1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2').
Currently, all the lines in Plot 1 have different colours and all the
lines in Plot 2 have different colors. I'd like for all lines in Plot 1
to be 'red' and all
2008 Oct 14
3
gWidgets install
Hi,
I wanted to install the gWidgets package and ran the following code:
------------------------------------------
> install.packages("gWidgets")
trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.7/gWidgets_0.0-30.zip'
Content type 'application/zip' length 1354268 bytes (1.3 Mb)
opened URL
downloaded 1.3 Mb
package 'gWidgets'
2007 Oct 24
2
Graphics - plotting two graphs
Hi,
I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is:
-------------------------------------------------------
par(mfrow=c(1, 1))
x1 <- c(2, 4, 6, 8, 10, 12)
x2 <- c(10, 20, 30, 40, 50, 60)
y1 <- c(10,12,15,22,34,21)
y2 <- c(40, 130, 150, 145, 40, 30)
par(las=1, mar=c(4, 4, 2, 4))
plot.new()
2012 Jun 06
2
ggplot2: legend for geom_rug() ..?
Hi,
I was trying to make another legend for the rug plot. Sample code:
library(ggplo2)
ids <- paste('id_',1:3,sep='')
before <- sample(9)
after <- sample(1:10,9)
dat <- as.matrix(cbind(before,after))
rownames(dat) <- rep(ids,3)
position <- c(rep(10,3),rep(13,3),rep(19,3))
mdat <- cbind(melt(dat),position)
ggplot(mdat, aes(position, value)) +
2006 Apr 27
0
pamr package: pamr.adaptthresh() error rates
Hi,
I was working on a classification problem using the pamr package. I used the pamr.adaptthresh() function to find the optimal accuracy of the classifier. I must not be doing it right, since it doesn't return the threshold values for optimum classification.
For example,if I run it on a dataset, I get the following result using pamr.adaptthresh():
predicted
true (1)
2006 Apr 27
0
package pamr: pamr.adaptthresh() error rates
Hi, I was working on a classification problem using the pamr package. I used the pamr.adaptthresh() function to find the optimal accuracy of the classifier. I must not be doing it right, since it doesn't return the threshold values for optimum classification. For example,if I run it on a dataset, I get the following result using pamr.adaptthresh(): predicted true
2006 Apr 27
0
package pamr: pamr.adapthresh() ---- Take 2!
Hi,
Sorry about the earlier formatting errors...
I was working on a classification problem using the pamr package. I used the pamr.adaptthresh() function to find the optimal accuracy of the classifier. I must not be doing it right, since it doesn't return the threshold values for optimum classification.
For example,if I run it on a dataset, I get the following result using
2006 Jun 07
1
knn - 10 fold cross validation
Hi,
I was trying to get the optimal 'k' for the knn. To do this I was using the following function :
knn.cvk <- function(datmat, cl, k = 2:9) {
datmatT <- (datmat)
cv.err <- cl.pred <- c()
for (i in k) {
newpre <- as.vector(knn.cv(datmatT, cl, k = i))
cl.pred <- cbind(cl.pred, newpre)
cv.err <- c(cv.err, sum(cl != newpre))
}
2007 Oct 25
0
Semi-supervised clustering using constraints?
Hi,
Is there any package that implements semi-supervised clustering through 'must-link' and 'cannot-link' constraints?
thanks!
__________________________________________________
[[alternative HTML version deleted]]
2008 Feb 15
1
Clustering with ordinal data
Hi,
Is there any clustering package in R that can cluster with ordinal data?
thanks!
____________________________________________________________________________________
Be a better friend, newshound, and
[[alternative HTML version deleted]]
2010 Feb 01
0
Biclust package: drawHeatmap()
Hi,
I was trying to draw a heatmap of the bicluster results. With the code given in the biclust package I can only get the heatmap for one cluster at a time (drawHeatmap function). Is there any way that I can get the heatmap for all the clusters at the same time?
The code that I am using (biclust documentation) is:
#Random 100x50 matrix with a single, up-regulated 10x10 bicluster
2010 Jul 06
0
lme4 installation
Hi,
I was trying to install the package
'lme4'. Here is the code and the sessionInfo() that I am using:
> install.packages("lme4",dependencies=T)
Warning in
install.packages("lme4", dependencies = T) :
argument 'lib' is
missing: using '/Users/ts/Library/R/2.11/library'
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :