Displaying 20 results from an estimated 10000 matches similar to: "call function immediately before plot.new()"
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
Hi everyone,
I am new to R, but it's really great and helped me a lot!
But now I have 2 questions. It would be great, if someone can help me:
1. I want to integrate a normal distribution, given a median and sd.
The integrate function works great BUT the first argument has to be a
function
so I do integrate(dnorm,0,1) and it works with standard m. and sd.
But I have the m and sd given.
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
2005 Jun 22
3
string/character to number
I did a very quick search of the archive and couldn't find a readily
available answer to this one:
I'd like to convert, for example:
c("a", "b", "a", "b")
to
c(1, -1, 1, -1)
In the case of the first vector, it may be any length, but will always
only have two unique values. It must always be replaced by
corresponding values of 1 and -1.
Any
2008 May 21
2
\S4method in combination with "[" and "[<-"
Dear developers,
We want to use "\S4method" to document new S4-methods for "[" and "[<-".
We use this for other functions/methods and it works without any
problem, but in case of "[" and "[<-" we didn't manage to bring this to
work.
The problem occurs in the development version of our package "distrSim"
which can be found
2006 Jan 03
1
S4 default initialization: unwanted NULL
The default initialization for slots of class "factor" and
"data.frame" gives NULL. This seems odd, since those slots can't ever
be set to NULL by the user. I would expect zero-length instances of
factor and data.frame.
Here is an example:
setClass("FOO", representation(a="factor", b="data.frame", c="numeric"))
[1] "FOO"
2008 Dec 14
2
Sweave/Rweave and results="verbatim"
Hello,
in a Rnw-file I have this used stuff to try out tex-results...
==============================
<<>>>=
texme <- function() cat( "{\\bf Hallo, das ist voll fett!}\n" )
@
<<results="verbatim">>=
texme()
@
==============================
I used this command: "R CMD Sweave example.Rnw"
and got this error:
2005 Dec 23
2
convolution of the double exponential distribution
Is there any R function that computes the convolution of the double
exponential distribution?
If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from
0 to Inf for any value of q and for any positive integer n? I need to
perform the integration within a function with q and n as arguments. The
function integrate() is giving me this message:
"evaluation of function gave a
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
2007 Feb 09
2
RE gap statistic in cluster analysis
Has anyone implemented Tibrishani's gap statistic in R or S plus? If so I would greatly appreciate the relevant script file.
Any help will be much appreciated
Kind regards
Dr Graham Leask
Economics and Strategy Group
Aston Business School
Aston University
Aston Triangle
Birmingham
B4 7ET
Tel: Direct line 0121 204 3150
email g.leask@aston.ac.uk
[[alternative HTML version deleted]]
2005 Aug 03
5
make error: X11/Intrinsic.h: No such,,,
Hi all,
I'm trying to build R 2.1.1 on Ubuntu 5.04 i686-SMP. Configure goes well
with:
./configure --with-BLAS --with-readline=no
but once I run 'make', I get the following error:
In file included from devX11.c:64:
devX11.h:57:74: X11/Intrinsic.h: No such file or directory
Any ideas?
Thanks in advance,
Jake
2005 Jul 21
3
heatmap color distribution
Hi all,
I've got a set of gene expression data, and I'm plotting several
heatmaps for subsets of the whole set. I'd like the heatmaps to have
the same color distribution, so that comparisons may be made
(roughly) across heatmaps; this would require that the color
distribution and distance functions be based on the entire dataset,
rather than on individual subsets. Does
2006 Feb 09
4
New user: Custom probability distribution
Hello,
Given a probability function: p(x) = 12 / (25(x+1)) , x=0, 1, 2, 3 we
generate the following values:
C1 C2
0 0.48
1 0.24
2 0.16
3 0.12
Now, I'm supposed to create 50 random values using this table. In
MiniTab, I simply selected Calc -> Random Data -> Discrete, and selected
the columns, and it created 50 random values in a new column.[1]
How do I do the
2006 Jun 30
5
median of gamma distribution
Doese anyone know a R function to find the median of a gamma distribution?
[[alternative HTML version deleted]]
2005 Nov 01
4
S4 classes in existing packages
R-devel,
I'm interested in looking at some examples of existing R packages that
rely heavily on S4 classes to get a feel for varying styles and
package organization techniques. Could you recommend any packages
that might serve as a good starting point?
Thanks in advance,
Jeff
2005 Nov 01
4
S4 classes in existing packages
R-devel,
I'm interested in looking at some examples of existing R packages that
rely heavily on S4 classes to get a feel for varying styles and
package organization techniques. Could you recommend any packages
that might serve as a good starting point?
Thanks in advance,
Jeff
2005 Apr 25
2
residuals in lmer
Does anyone know how to extract residuals in lmer?
Here's the error I get:
>
crop.lme=lmer(response~variety*irrigation*pesticide+(1|rep)+(1|rep:
pesticide)+(1|rep:pesticide:irrigation), crop.data)
> qqnorm(crop.lme)
Error in qqnorm.default(crop.lme) : y is empty or has only NAs
> resid(crop.lme)
NULL
Thanks!
--Jake
2006 Nov 18
1
Questions regarding "integrate" function
Hi there. Thanks for your time in advance.
I am using R 2.2.0 and OS: Windows XP.
My final goal is to calculate 1/2*integral of
(f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes:
$\frac{1}{2}\int^{{\infty}}_{\infty}
(\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two
marginal densities.
My problem:
I have the following R codes using "adapt" package. Although "adapt"
2008 Sep 19
1
indexing by character with identical names
Hi all,
I've been using R for a while, but was puzzled when I just barely
noticed this behavior:
> x <- 1:10
> names(x) <- c("a","b","a",letters[1:7])
> x
a b a a b c d e f g
1 2 3 4 5 6 7 8 9 10
> x["a"]
a
1
... that is, if a vector has identical (and therefore ambiguous) names,
it only returns the first
2010 Jun 06
1
Robust Asymptotic Statistics (RobASt)
Hi all,
Other than:
http://www.stamats.de/F2006.r
Are there other good simple examples out there of using the ROptRegTS
package (part of the RobASt project)? I'm hoping to plug it in for
multivariate regression. Or is this not a good idea? Just trying to
find out how it compares to rlm, lts, glm, etc. Hopefully this makes
sense, I'm new to the world of statistics and R.
Thanks!
St0x
2008 Feb 27
1
d_fontdb.d, g_her_glyph.d
Dear Developers,
I'm updating my R installation via svn (currently: Revision 44626). For
some time now (sorry don't know the exact revision number) make for R
devel yields the following error
make[4]: *** Keine Regel vorhanden, um das Target
?../../../src/include/R_ext/GraphicsBase.h?,
ben?tigt von ?g_fontdb.o?, zu erstellen. Schluss.
(translation: no rule to make target ...