search for: andrewjyee

Displaying 11 results from an estimated 11 matches for "andrewjyee".

2007 Aug 16
3
multiple colors within same line of text
Hi, I'm interested in using mtext(), but with the option of having multiple colors in the same line of text. For example, creating a line of text where: Red is red and blue is blue How do you create a text argument that lets you do this within mtext()? Thanks, Andrew MGH Cancer Center [[alternative HTML version deleted]]
2008 Apr 24
2
alternatives to RColorBrewer?
I've found RColorBrewer useful for its qualitative palettes, but wished that it could generate more than 12 qualitative palettes (e.g. with Set3). Any suggestions for alternative color palette generators that can handle e.g. 18 distinctive colors? (I'm aware of using rainbow(), but this doesn't generate enough distinct colors when the number of palettes is large). Thanks, Andrew
2007 May 29
2
trouble understanding why ...=="NaN" isn't true
I have the following data: > dataset[2,"Sample.227"] [1] NaN 1558 Levels: -0.000 -0.001 -0.002 -0.003 -0.004 -0.005 -0.006 -0.007 -0.008- 0.009 ... 2.000 However, I'm not sure why this expression is coming back as FALSE: > dataset[2,"Sample.227"]=="NaN" [1] FALSE Similarly: > dataset[2,"Sample.227"]==NaN [1] NA It seems that since
2007 May 29
2
looking for the na.omit equivalent for a matrix of characters
I have a matrix of characters (actually numbers that have been read in as numbers), and I'd like to remove the NA. I'm familiar with na.omit, but is there an equivalent of na.omit when the NA are the actual characters "NA"? Thanks, Andrew [[alternative HTML version deleted]]
2007 May 16
3
more woes trying to convert a data.frame to a numerical matrix
I have the following csv file: name,x,y,z category,delta,gamma,epsilon a,1,2,3 b,4,5,6 c,7,8,9 I'd like to create a numeric matrix of just the numbers in this csv dataset. I've tried the following program: sample.data <- read.csv("sample.csv") numerical.data <- as.matrix(sample.data[-1,-1]) However, print(numerical.data) returns what appears to be a matrix of
2007 Aug 23
1
in cor.test, difference between exact=FALSE and exact=NULL
Pardon my ignorance, but is there a difference in cor.test between exact=FALSE and exact=NULL when method=spearman? Take for example: x<-c(1,2,2,3,4,5) y<-c(1,2,2,10,11,12) cor.test(x,y, method="spearman", exact=NULL) This gives an error message, Warning message: Cannot compute exact p-values with ties in: cor.test.default(x, y, method = "spearman", exact = NULL)
2008 Jan 20
1
changing color scheme in R in UNIX
Hi, I've been using R in Windows but am now starting to use it more often in the UNIX environment. In Windows, I'm used to the text provided by the user appearing in red, and the output from R appearing in blue. Is there a way to achieve this in UNIX? Thanks, Andrew [[alternative HTML version deleted]]
2007 May 17
1
trouble installing RWinEdt
I have been having some difficulty instaling RWinEdt 1.7-5 I've tried a couple methods, including installing the package from a zip file that I've downloaded locally. It installs fine, but then I get an error message with library(RWinEdt) as follows: > library(RWinEdt) Error in getWinEdt() : WinEdt is not installed properly. Either reinstall WinEdt or install R-WinEdt manually as
2007 May 18
1
naive question about using an object as the name of another object
This is a dumb question, but I'm having trouble finding the answer to this. I'd like to do the following: x<-"asdf" and then have the object x.y become automatically converted/represented as asdf.y (sort of akin to macro variables in SAS where you would do: %let x=asdf and do &x..y) What is the syntax for having x represented as "asdf" in x.y ? Thanks,
2007 May 28
0
using cutree() to figure out the heatmap cluster labels on the left
I've been using heatmap(), hclust(), and cutree(), and I'm trying to figure out the column labels of the left (as opposed to the right) cluster. Using cutree(x, k=2), I get two clusters labeled 1 and 2. How do you figure out if cluster 2 is the one associated with the left cluster on the heatmap (instead of manually going to the heatmap)? Thanks, Andrew Andrew Yee, MD MGH Cancer Center
2007 Jun 03
2
getting t.test to work with apply()
Hi, I'm interested in using apply() with t.test() on a data.frame. Specifically, I'd like to use apply() to do the following: t.test(raw.sample[1,alive],raw.sample[1,dead]) t.test(raw.sample[2,alive],raw.sample[2,dead]) t.test(raw.sample[3,alive],raw.sample[3,dead]) etc. I tried the following, apply(raw.sample,1,function(x) t.test(raw.sample[,alive],raw.sample[,dead])) but it gives