Displaying 20 results from an estimated 900 matches similar to: "Brewer.pal error"
2008 Mar 14
1
smoothScatter
Hi, I have been trying to plot density plots using the example on:
http://addictedtor.free.fr/graphiques/graphcode.php?graph=139
I used to use this function, but I cannot get any old code or even the example to work.
library("geneplotter")
require("RColorBrewer")
x1 <- matrix(rnorm(1e4), ncol=2)
x2 <- matrix(rnorm(1e4, mean=3, sd=1.5), ncol=2)
x <-
2005 Jul 07
2
Brewer colours
Anyone who is interested in using optimal colour palettes should
look at the work of Cindy Brewer: www.colorbrewer.org
I have written code to use her colour schemes in R. It is
included below. Perhaps someone may find this interesting enough
to work into a package.
Included also is a function showpalette, which was posted here a
while back. I don't remember who wrote it.
I have copied all
2010 Sep 08
1
saving heatmaps in graphical format that can be edited in graphic editor tool
I generated a heatmap in R using the following commands:
> mydata <- read.csv(file="Data.csv", header=TRUE, sep=",")
> mydata <- mydata[rowSums(mydata[,-1]^2) >0, ]
> rownames(mydata)=mydata$Name
> mydata <- mydata[,2:253]
> mydatamatrix <- data.matrix(mydata)
> mydatascale <- t(scale(t(mydatamatrix)))
> hr <-
2010 Sep 08
2
saving heatmaps in graphical format that can be edited in graphic editor tools
I generated a heatmap in R using the following commands:
> mydata <- read.csv(file="Data.csv", header=TRUE, sep=",")
> mydata <- mydata[rowSums(mydata[,-1]^2) >0, ]
> rownames(mydata)=mydata$Name
> mydata <- mydata[,2:253]
> mydatamatrix <- data.matrix(mydata)
> mydatascale <- t(scale(t(mydatamatrix)))
> hr <-
2012 Oct 10
0
Resumen de R-help-es, Vol 44, Envío 9
Estimado Jose:
En nuestro caso utilizamos las mismas librerias y solemos resolverlo asi
(donde el color depende del valor que se le asigne)
//--------------------------------------------------------------------------------------------------------------------------------------
#configuramos donde
setwd("D:/mapas/")
#Carga de librerias
library (sp)
library (RColorBrewer)
library
2010 Feb 25
1
Updating a hexbinplot
Dear all,
Considering this simple example of hexbinplot:
mixdata <-
data.frame(x = c(rnorm(5000), rnorm(5000,4,1.5)),
y = c(rnorm(5000), rnorm(5000,2,3)),
a = gl(2, 5000))
fig <- hexbinplot(y ~ x | a, mixdata)
print(fig)
update(fig, colramp = BTC)
produces a bad (non-updated) legend. Compare it with:
hexbinplot(y ~ x | a, mixdata, colramp = BTC)
What
2012 Dec 16
3
xlim/ylim problem
Hi everybody,
just arrived at R and immediately I got a problem.
Here's my script:
setwd("C:/Users/Tom/Eigene Tools/Programming/R/Data")
blast_hits<-read.table("blastHit_covLenght.txt", header=T)
blast_hits <- as.matrix(blast_hits)
numerical1<-data.matrix(blast_hits, rownames.force = NA)
2010 Jan 28
2
color palette for points, lines, text / interactive Rcolorpicker?
I'm looking for a scheme to generate a default color palette for
plotting points, lines and text (on a white or transparent background)
with from 2 to say 9 colors with the following constraints:
- "red" is reserved for another purpose
- colors should be highly distinct
- avoid light colors (like "yellow"s)
In RColorBrewer, most of the schemes are designed for area fill
2010 Aug 26
7
Find classes for each column of a data.frame
Hello,
Is there a simple way to get the class type for each column of a
data.frame? I am in the situation where I would like to get all the
columns of a data.frame that are factors.
I have tried:
apply(df,2,class)
but all the columns come back as class "character".
Thanks
Dan
--
**************************************************************
Daniel Brewer, Ph.D.
Institute of
2009 Apr 06
2
Collapse data matrix with extra info separated by commas
Hello,
I would like to reshape my data for presentation purposes from something
like this:
> test <-
data.frame(a=c("A","A","A","A","B","B","B"),b=c(1,1,2,2,1,1,1),c=1:7)
> test
a b c
1 A 1 1
2 A 1 2
3 A 2 3
4 A 2 4
5 B 1 5
6 B 1 6
7 B 1 7
to something like this:
a b c
1 A 1 1,2
3 A 2 3,4
5 B 1 5,6,7
This seems
2007 Aug 07
11
Positioning text in top left corner of plot
Simple question how can you position text in the top left hand corner of
a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I
want to do is label these plots a), b), c) etc. I have been fiddling
around with both text and mtext but without much luck. text is fine but
each plot has a different scale on the axis and so this makes it
problematic. What is the best way to do this?
2006 May 22
2
SUSE 10.1 64 bit binary
Hi,
I was just wondering if anyone had created a 64 bit binary for SUSE 10.1
x86_64 yet. Unfortunately, I upgraded before looking whether a package
was available and now cannot find a suitable package on CRAN. If noone
has produced one yet, does anyone have any idea when one will be available?
Many Thanks
Daniel Brewer
2005 Dec 13
4
Ploting graphics using X tints from a color
Hi,
I'm trying to draw a 2D plot using multiple tints of red. The
(simplified) setup is the following: || year | x | y ||
My idea is that each year is plotted with a different tint of red.
Older year (lightest) -> Later year (darkest). I've managed to plot
this with different scales of grays simply by doing:
palette(gray(length(years):0/length(years)))
before the plot and for each
2009 Jan 20
2
Stacked barplot with two stacked bars besides each other
Hi,
I have a particular barplot I would like to generate, but I am having
trouble getting it to work. What I would like is in effect two barplots
with stacked bars merged into one. For example, I have two samples
(yoda1,yoda2) on which I measure whether two variables (var1,var2) are
present or absent for a number of measurements on that sample.
> var1 <- data.frame(yoda1=c(3,7),
2003 Jul 05
1
Samba 2.2.8 + Printers (UFMG)
Hi.
I'm admin at a computer lab. Just started here, and I'm trying to set samba up. I'm having the following problem:
The server (FreeBSD 4.7) has a HP LaserJet 6MP installed on it. So far so good, works great. When installing this printer on network computers, I have no problem, even printing, but someone installed the wrong driver (fortunatelly its a PS driver).
When I try to
2008 Jan 31
3
Log rank test power calculations
Does anyone have any ideas how I could do a power calculation for a log
rank test. I would like to know what the suggested sample sizes would
be to pick a difference when the control to active are in a ratio of 80%
to 20%.
Thanks
Dan
--
**************************************************************
Daniel Brewer, Ph.D.
Institute of Cancer Research
Email: daniel.brewer at icr.ac.uk
2009 Dec 23
2
COnfidence intervals for estimates of linear model
Hello,
I would like to calculate the 95% confidence intervals for the estimates
of a linear model and I just wanted to check that I am doing it correct.
Is it just:
Estimate + 1.95996*Std.Error to Estimate - 1.95996*Std.Error
or is there another approach that doesn't assume a normal distrbution?
Thanks. Apologies for my naiivity
Dan
--
2010 Jan 26
2
heatmap.2 color range
Hi,
I'm trying to create a heatmap with color ranges for different values in my
matrix. For example:
If x > 5 , use orange gradient
if x < 1.5, use red gradient
.....
Right now I have the following:
orgPal<-brewer.pal(3,"Oranges")
bluPal<-brewer.pal(3,"Blues")
redPal<-brewer.pal(3,"Reds")
grad <- ifelse(randMat >
2010 May 14
2
help color coding map in R
I am trying to create a map with selected states based on highest to lowest mean cost. The following code properly selects the correct states, and the legend is properly color coded with ranges, but the colors per range does not match the state colors. I need help getting the state colors to match the ranges outlined in the legend. I have tried ordering the mean amounts and this correctly creates
2005 Apr 28
1
strange behaviour of importFrom directive in name space
Dear listers,
After activating the name space for my bioconductor package (prada) I
successfully ran R CMD check. However when loading the package in R and
running the examples the imported function brewer.pal from package
RColorBrewer is not found. I can directly call brewer.pal from the
RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not
imported into my prada name space. When