another solution:
l <- vector(mode = "list", length = 10^5)
system.time(for(i in (1:10^5)) l[[i]] <- c(i,i+1,i))
On my system this version is even slightly faster than the matrix version ...
Best,
Matthias
- original message
Subject: Re: [R] filling a list faster
Sent: Fri, 13 Jul
Hello Alberto, hello Greg,
in distr you can do:
library(distr)
N <- Norm(mean = 1, sd = 2)
p(N)(0.5)
r(N)(100)
!!! not: p(N, 0.5) or r(N, 100) !!!
A detailed description of package "distr" is given in package "distrDoc".
library(distrDoc)
vignette("distr")
hth
Matthias
- original messag
l [EMAIL PROTECTED]
> [[alternative HTML version deleted]]
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minima
>
> both work fine. Why is pnorm to prefer?
>
> Nils
>
>
> Matthias Kohl schrieb:
> > Hi,
> >
> > why don't you use pnorm?
> > E.g.,
> >
> > pnorm(1, mean = 0.1, sd = 1.2) - pnorm(0, mean = 0.1, sd = 1.2)
> >
> > Matthias
&g
p@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> &g
mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> __
ter
>University of Minnesota
>
>______
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-
not concerning your subject line, but function "crossprod" may be useful, too
Matthias
- original message
Subject: Re: [R] Computing time for matrix addition or subtraction
Sent: Mon, 13 Nov 2006
From: Prof Brian Ripley<[EMAIL PROTECTED]>
> On Sun, 12 Nov 2006, YONGWAN CHUN wrote:
-
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
--- original Nachricht Ende
--
Dr. re
Hi,
have a look at the packages distr and distrSim which are on CRAN.
hth
Matthias
- original Nachricht
Betreff: [R] Generic code for simulating from a distribution.
Gesendet: Mo, 10. Apr 2006
Von: [EMAIL PROTECTED]
> Hello all,
>
> I have the code below to simulate samples of ce
lp
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
--
StaMatS - Statistik + Mathematik Service
Dr. rer. nat. Matthias Kohl
Gottlieb-Keim-Straße 60
95448 Bayreuth
Phone: +49 921 50736457
E-Mail: [EMAIL PROTECTED]
Home: www.stamats.de
___
r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
StaMatS - Statistik + Mathematik Service
Dr. rer. nat. Matthias Kohl
Gottlieb-Keim-Straße 60
95448 Bayreuth
Phone: +49 921 50736457
E-Mail: [EMAIL PROTECTED]
Home: www.stamats.de
the object.
>Is there a way to extend a data.frame, or do I need to create an
>object that contains the data frame in a slot?
>
>Thanks for your help,
>
>Hadley
>
>______
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/
t;David R. Bickel http://davidbickel.com
>Research Scientist
>Pioneer Hi-Bred International (DuPont)
>Bioinformatics and Exploratory Research
>7200 NW 62nd Ave.; PO Box 184
>Johnston, IA 50131-0184
>515-334-4739 Tel
>515-334-4473 Fax
>[EMAIL PROTECTED], [EMAIL PROTECTED]
&g
list(loc = loc, scale = sca))
D1 <- new("AbscontDistribution", r = rfun, d = dfun, p = pfun, q = qfun)
plot(D1)
D2 <- D1 + D1 # convolution based on FFT
plot(D2)
hth,
Matthias
--
StaMatS - Statistik + Mathematik Service
Dipl.Math.(Univ.) Matthias Kohl
www.stamats.de
__
__
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
>http://www.R-project.org/posting-guide.html
>
>______
>R-help@stat.math.ethz.ch mailing li
386-pc-mingw32
>arch i386
>os mingw32
>system i386, mingw32
>status
>major2
>minor1.0
>year 2005
>month04
>day 18
>language R
>
>__
>R-help@stat.math.ethz.ch mailing list
>htt
Anna Oganyan wrote:
>Hello,
>May be somebody can help me...
>I am trying to find a solution of a convolution equation using fft (and
>unfortunately I do not have a good background for this).
>So I am just trying to figure out how it can be implemented in R. I have
>two multidimensional independe
Peter Dalgaard wrote:
>katrina smith <[EMAIL PROTECTED]> writes:
>
>
>
>>I am trying to find a definition for the two-tailed exact binomial
>>test but have been unsuccessful. Can you help?
>>
>>
>
>Just read binom.test. The relevant bit is this:
>(m is the mean == n*p)
>
>else if
Christian Hennig wrote:
>Hi list,
>
>1) How can the MM-estimator method="MM" in function rlm be tuned to 85%
>efficiency? It seems that there is a default tuning to 95%. I presume, but
>am not sure, that the MM-estimator uses phi=phi.bisquare as default and
>the tuning constant could be set by add
Achim Zeileis wrote:
On Sat, 30 Apr 2005, Peter Dalgaard wrote:
Paul Smith <[EMAIL PROTECTED]> writes:
Dear All
I would like to know whether it is possible with R to define a
discrete random variable different from the ones already defined
inside R and generate random numbers from that user
(Ted Harding) wrote:
On 21-Apr-05 [EMAIL PROTECTED] wrote:
Here's a bit of a refinement on Ted's first suggestion.
[ corrected from runif(M*k), N, k) to runif(N*k), N, k) ]
N <- 1
graphics.off()
par(mfrow = c(1,2), pty = "s")
for(k in 1:20) {
m <- (rowMeans(matrix(runif(N*k), N, k)) - 0.5
Thank you,
Matthias
> Hi Matthias,
>
> A similar problem to yours (with one level of inheritance less) was
> disccussed this month on the r-devel list.
> You find an answer from JChambers here:
>
> https://stat.ethz.ch/pipermail/r-devel/2004-October/030980.html
>
> And yes specifying _setAs_ to
Hello,
am I using 'setIs' in the correct way in the subsequent (artifical) example?
Do I have to specify explicit 'setAs' for 'list' and 'vector' or
should this work automatically, since "getClass("List1")" states
an explicit coerce also for these classes.
I'm working with R 2.0.0 Patched (2004-
please, take a look at package "evd"
Matthias
> Does R have built in Gumbel distribution (pdf, ecdf, hazard, parameters
> estimation) for the minimum case? Thanks
>
> Anne
> [[alternative HTML version deleted]]
>
> __
> [EMAIL PROTECTED] mailing
sorry, please replace exportClass by exportClasses
> Hello,
>
> I have a question concerning "setClassUnion".
> I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
>
> I tried to use "setClassUnion" in a package I am currently working on.
> The situation is similar to the following exam
Hello,
I have a question concerning "setClassUnion".
I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
I tried to use "setClassUnion" in a package I am currently working on. The
situation is similar to the following example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0),
> Dear expeRts,
>
> I fail to succesfully pass strings to functions. It comes down to the
> observation that
>
> > plot(someVariable,anotherVariable)
>
> works fine, but
>
> > x <- "someVariable"
> > y <- "anotherVariable"
> > plot(x,y)
>
> does not.
>
> Does this have something to do with the
Hi,
we have some questions concerning the definition of new arithmetic methods.
In our package "distr" (on CRAN) we define some new arithmetic methods
for "+", "-", "*", "/".
After loading "distr" the corresponding arithmetic methods work. Now, if
we define a new
class and also a new method for o
> "Robin Gruna" <[EMAIL PROTECTED]> writes:
>
>> I have the following problem: I have a list as follows,
>>
>> > values <- list(red = 1, yellow = 2, blue = 3)
>>
>> > values
>> $red
>> [1] 1
>>
>> $yellow
>> [1] 2
>>
>> $blue
>> [1] 3
>>
>> There is also a vector containing the diffrent "colors" as
Hi,
I'm using Version 1.9.0 (2004-04-12) on Windows NT/98/2000 and found
the following difference between using setClass(..., valdity = ),
respectively using setValidity() afterwards:
setValidity() changes the "Extends"-part of a derived class, is this
intended or a bug or am I missing someth
Martin Maechler schrieb:
"Matthias" == Matthias Kohl <[EMAIL PROTECTED]>
on Thu, 27 May 2004 14:01:51 +0100 writes:
Matthias> Hi all, in the help for RClassUtils I found the
Matthias> expression "privileged slots" in function
Matthias
Hi all,
in the help for RClassUtils I found the expression "privileged slots" in
function "checkSlotAssignment" with the explanation:
/privileged slots (those that can only be set by accesor functions
defined along with the class itself)/
I thought all slots of a (not private) class can be a ac
maybe, the RColorBrewer package does what you want?
see also: ColorBrewer.org
> Hi,
>
> I am plotting a policy function (result from a dynamic stochastic
> optimization problem, discretized approximation). The policy function
> maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space
Hello,
by checking the precision of a convolution algorithm, we found the
following "inexactness":
We work with R Version 1.8.1 (2003-11-21) on Windows systems (NT, 2000,
XP).
Try the code:
## Kolmogorov distance between two methods to
## determine P(Poisson(lambda)<=x)
Kolm.dist <- function(la
TIA
Hello,
help(var) says:
The denominator n - 1 is used which gives an unbiased estimator of
the (co)variance for i.i.d. observations.
Try:
n <- length(cars[,1])
var(cars[,1])*(n-1)/n
Matthias Kohl
__
[EMAIL PROTECTED] mailing list
https://www.s
36 matches
Mail list logo