Displaying 20 results from an estimated 3000 matches similar to: "Strategy for creating a palette...?"
2005 Aug 03
3
red-black-green color palette?
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to create one?
Thanks,
Jake
2001 Aug 02
1
Package GSS for interpolation in more than 2D?
Dear all,
There has been some time since I asked about interpolation in higher (>2)
dimensions, and I must admit I failed to write a function to do this
myself the last time, but eventually ended up doing it in MATLAB. I tried
to translate the MATLAB code, but MATLAB code is so much more opaque than
R (S) code, so I failed that too, mainly because I could only get one
MATLAB session, I would
2001 Nov 16
1
$name vs. [["name"]]
Dear all,
I have been away for a month, but some time ago, I noted something that
was very surprising to me. I think this example illustrates it well:
> test <- data.frame(col1 = c(1,2), col2=c(3, 4))
> test
col1 col2
1 1 3
2 2 4
> apply(test, 1, function(x) browser())
Called from: FUN(newX[, i], ...)
Browse[1]> x$col1
NULL
Browse[1]> x[["col1"]]
[1] 1
2000 Jan 14
2
Matrix output from drawing functions
Dear all,
I'm a bit confused about the output from functions that generates random
values, e.g. rpois. I'm using 0.65.1 on Digital UNIX alphaev6.
If I say
> rpois(10,5)
output is not unexpectedly:
[1] 4 6 5 7 6 5 2 2 5 3
but I figured that if I go:
> rpois(10,1:10)
I would get a 10x10 matrix as output, with random values for each of
the vector elements in the row vectors, but
2000 Aug 04
1
Inverting matrix...
Dear all,
Either I'm being totally blind now (as you know, the eyes are the first
thing that is blinded :-)), or something is missing in
"An Introduction to R". The section heading of section 5.7.1 is
"Multiplication, inversion and solving linear equations", and since I was
looking for the canonical way of inverting a matrix, this was the place to
look. However, I found
2000 Jun 24
1
Garbage Collecting
Dear all,
Me and the Garbage Collector doesn't understand each other...
I'm on R-1.0.1 (I have requested an upgrade to the right local people), an
osf1 system with an alphaev6 CPU. I have fair amounts of memory to use,
but it seems to be used up pretty fast nevertheless.
I'm now trying to see what the garbage collector does, I have inserted a
gc(v=T)
call at a spot in my code.
I
2001 Feb 15
2
Reading single precision floats from binary file
Dear all,
I have a few files with binary data written by a C program a friend wrote.
I allready have program to read these files, Thomas Lumley and Prof Brian
D Ripley was kind enough to respond to a question to this list earlier
with some code that works perfectly, so this is really no problem, it is
more out curiousity.
Most of my files consists of 40000 single precision floats, and I figured
2011 Feb 24
3
set argument of a function by string variable
Hi folks,
I am wondering if the following is possible: I want to control the
arguments sent to a function by string variables. For example, instead of
> heatmap.2( A, col=greenred(75) )
I would want to have something like:
> heatmap.2 ( paste(A, "col=greenred(75)", sep=",") )
Is this possible to do that?
Thanks,
D.
2000 Apr 26
1
Writing lgrindefs
Dear all,
I'm writing a lgrind definition for R. Lgrind is a program to produce
pretty program listings for inclusion in LaTeX documents. Does anybody
here have any experience with lgrindefs?
My definition now looks like this:
R:\
:pb=^\d?\p\d<-\dfunction\(\a\):\
:bb={:be=}:cb=\d#:ce=$sb=":se=\e":lb=':le=\e':id=.:\
:zb=@:ze=@:tb=%%:te=%%:mb=%\$:me=\$%:vb=%\|:ve=\|%:\
2000 Apr 26
1
Writing lgrindefs
Dear all,
I'm writing a lgrind definition for R. Lgrind is a program to produce
pretty program listings for inclusion in LaTeX documents. Does anybody
here have any experience with lgrindefs?
My definition now looks like this:
R:\
:pb=^\d?\p\d<-\dfunction\(\a\):\
:bb={:be=}:cb=\d#:ce=$sb=":se=\e":lb=':le=\e':id=.:\
:zb=@:ze=@:tb=%%:te=%%:mb=%\$:me=\$%:vb=%\|:ve=\|%:\
2000 Nov 08
3
Strange means of numbers drawn from rpois
Dear all,
I think I must be going crazy.... If I do
> mean(rpois(1000000, 14))
I get:
[1] 13.50420
and again:
> mean(rpois(1000000, 14))
[1] 13.49896
> mean(rpois(1000000, 14))
[1] 13.50161
> mean(rpois(1000000, 15))
[1] 14.49250
> mean(rpois(1000000, 15))
[1] 14.49897
> mean(rpois(1000000, 14.5))
[1] 13.99689
> mean(rpois(1000000, 14.5))
[1] 13.9963
This was on a
platform
2000 May 25
4
Needed: Understading runif() output :-)
Dear all,
I have been trying to understand what runif() is telling me.
I am generating lots of numbers (billions and billions (wow, I''ve dreamed
about saying that for many years... :-) ), for a distribution that has the
following quantile function:
1 / (2 * sqrt(1 - p))
(that is, the distribution has a lower cutoff)
As you can imagine, this has rather heavy upper tail. I was
2008 May 14
4
Heatmap.2 - eliminate cluster and dendrogram
Using the heatmap.2 function, I am trying to generate a heatmap of a
2 column x 500 row matrix of numeric values. I would like the 1st
column of the matrix sorted from the highest to the lowest values -
so that the colors reflected in the first column of the heatmap (top
to bottom) go from red to green.
After sorting the matrix (z), I tried the following command, but the
data remains
2001 Jun 04
1
2D convolution
Dear all,
I have an image that I need to filter, and so I'm looking for a method to
convolve it with a matrix. If I understood the docs for convolve
correctly, it only works in 1D (and I have tried to convolve, it didn't
look good).
So, I wondered if anybody have implemented 2D convolution in R, or have
any good advices to share (beyond having a look at mvfft), before I go
hacking?
2000 Feb 13
1
Underflow warnings?
Dear all,
I'm a bit concerned about underflow problems. Such problems typically
occur when two almost equal numbers are subtracted. I was wondering if R
has any mechanisms for warning users about potential problems, or if any
policy has been developed?
To check, I just did:
> 1.0000000000000001 - 1
[1] 0
> 1.000000000000001 - 1
[1] 1.110223e-15
> 1.00000000000001 - 1
[1]
2001 Apr 30
1
Some loglog density plot
Dear all,
A looong time ago, Witold Eryk Wolski asked here why there wasn't a
log="xy" parameter to the hist() function
<URL:http://www.R-project.org/nocvs/mail/r-help/2001/0267.html>, and
Prof. Ripley responded that a loglog histogram does not make much sense,
and that one should use a better density estimate if one seeks to plot
log density.
I understand the point and I
2002 Jan 10
0
Add qqline to plot.lm Q-Q plot?
Dear all,
Is there a simple way to add a qqline to the Q-Q plot plot.lm() produces
for which = 2?
If not, I might write one, but how should this preferably be
implemented? Make qqline() generic and add a qqline.lm() method? Add
an argument to plot.lm()? Have plot.lm() output something invisibly
that qqline() can chew directly? Have plot.lm() output something
invisibly that abline() can chew?
2002 Feb 18
0
Kudos (and SVG)
Dear all,
I have just finished my thesis titled "Gravitational Microlensing of
Quasar Clouds", and the following paragraph appeared in my
"Acknowledgements":
"I would like to thank the authors of R and the R core team for
their great skill and dedication in developing this software, and
to all the members of the R-help mailing list, especially Brian
D. Ripley,
2000 Nov 08
1
Re: [R] Strange means of numbers drawn from rpois (PR#730)
On 8 Nov 2000, Peter Dalgaard BSA wrote:
>Done...
Great!
>(This kind of behaviour has been observed on various platforms and
>various compilers, sometimes getting stuck around 15.15 and sometimes
>around 14.5. Others report no problems. Very strange. I've seen one
>case where it apparently shifted from one regime to the other.)
Yes, it does that here too.... The following is
2000 Jul 27
1
Interpolation using a piecewise linear function in higher dimensions
Dear all,
I am just wondering if anybody has implemented a function that can give a
piecewise linear interpolation in more than 2 dimensions?
I have looked at the akima package, but I would rather like a piecewise
linear interpolation rather than a spline and while it did the job quite
satisfactory for 2 dimensions, I need to interpolate in at least three
dimensions. If anybody has implemented