Dear all,
I do not know how to deal with block matrices in R.
For example I have 3 matrices A, B and C.
And I want to produce a new matrix of this form
( A B 0 )
( 0 0 C )
where A, B and C are one-row matrices.
Apart from A, B and C, all the coefficients are 0.
Is there an easy solution in R
t; On Wed, Feb 24, 2010 at 12:56 PM, Gustave Lefou
> wrote:
> > Dear all,
> >
> > I do not know how to deal with block matrices in R.
> >
> > For example I have 3 matrices A, B and C.
> >
> > And I want to produce a new matrix of this form
> >
Dear all,
>From the recent discussion, I have wondered where I could find some quick
step documentation on Emacs for R (especially on Windows).
All I have found is that 80 pages pdf http://ess.r-project.org/ess.pdf
Maybe I am asking for too much ?
Best,
Gustave
[[alternative HTML versi
.., DSC 2001 Proceedings of the
> 2nd International Workshop on Distributed Statistical Computing, March
> 15-17, Vienna, Austria
>
> Cheers
>
> David Cross
> d.cr...@tcu.edu
> www.davidcross.us
>
>
>
>
>
>
> On Mar 1, 2010, at 10:41 AM, Gustave Lefou wrot
Dear R users,
I have two vectors : x and y. x takes negative values and y positive ones.
I write :
> plot(x)
> lines(y)
However because y takes positive values, I cannot see y.
What can I do ?
Thank you very much,
Gustave
[[alternative HTML version deleted]]
Thanks Mario and Jim
2010/4/13 jim holtman
> plot(x, ylim=range(c(x,y)), xlim=c(0,max(c(length(x),length(y
>
> might work.
>
> On Tue, Apr 13, 2010 at 7:19 AM, Gustave Lefou wrote:
>
>> Dear R users,
>>
>> I have two vectors : x and y. x takes negative
Dear R users,
I have a function which takes as arguments big arrays, say : w, x , y and z.
My function changes these arrays and I want them as result/output.
I have tried to write return(w,x,y,z), and thus to replace the previous w,
x, y and z. It does not seem to work.
What can I do ?
Thank y
Thank you David, Jim and Gunter.
Actually I knew about the list thing. Everything got confused in my head :-(
I guess I am a bit tired...
2010/4/16 David Winsemius
>
> On Apr 16, 2010, at 12:02 PM, Gustave Lefou wrote:
>
> Dear R users,
>>
>> I have a function whic
Dear R users,
I have downloaded some packages. The beginning is very slow until I am
allowed to choose a CRAN server. Then it is faster.
I get a warning message each time at the end of the download :
"The downloaded packages are in
C:\etc
Warning message:
In open.connection(con, "r") :
Thank you very much Siri and Uwe.
So there is no problem with the packages downloaded.
2010/4/27 Uwe Ligges
>
>
> On 27.04.2010 12:21, Gustave Lefou wrote:
>
>> Dear R users,
>>
>> I have downloaded some packages. The beginning is very slow until I am
>> a
Dear all,
I have a function f(x).
> ptm <- proc.time()
> y=f(x)
> proc.time() - ptm
works fine for me.
However it is not possible to write
> system.time(y=f(x))
and
> system.time(f(x))
does not store the value of f(x).
Should I prefer the 3 lines with proc.time ?
Thank you very much,
Gusta
Thank you Bill, Peter and Barry.
2010/5/17 Barry Rowlingson
> On Mon, May 17, 2010 at 6:24 PM, Peter Ehlers wrote:
>
> > Try
> > system.time(y <- f(x))
> >
> > and see ?"=".
> >
> > -Peter Ehlers
>
> Ah ha. That explains the curly brackets I saw in a posting with
> system.time on stack ove
Thank you Alexander
2010/5/17 Alexander Shenkin
> You could also put the call to system.time inside the function itself:
>
> f = function(x) {
>system.time({
>... #function's code
>ret_val = ...
>}); flush.console();
>return ret_val;
> }
>
> i s'pose you'd miss out on
Dear all,
Just one last question. There seems to be no problem in writing
> z = system.time(y <- f(x))
or
> z <- system.time(y <- f(x))
Then z contains the named vector of the elapsed times, and y the value of
the function f(x).
Am I right ?
Thank you very much,
Gustave
2010/5/17 Alexander
Hello,
I have got the following error message (translated from French to English)
using "fitdistr" :
" Error in fitdistr(nira, "weibull") : optimization failed
Furthermore : There are 50 warnings or more (use warnings() to see the first
50) "
I used "fitdistr" in a loop and I think the loop stop
Hello,
I have to do a few graphics of the same function and this function is
parametrized by two arguments.
What I would like is to be able to change the value of these two arguments
without changing the plot command. So as to copy paste.
I tried the following :
x=1:100
eta=10
beta=5
plot(x,h(x
st(myeta=eta,mybeta=beta)) )
Any idea ?
Thank you very much
2008/5/9 Henrique Dallazuanna <[EMAIL PROTECTED]>:
> Try this:
>
> plot(x, log(x),
> xlab = "x", ylab = "h(x)",
> main = bquote(Failure~rate~from~W(eta == .(eta), beta == .(beta)))
>
&
* Sigma[x] * "=" *
bgroup("(",atop(s1~~s3,s2~~s4),")"),param.list))
So like in my problem the problem seems to be ==.
Thank you very much
2008/5/10 Gustave Lefou <[EMAIL PROTECTED]>:
> Thank to both of you.
>
> I found an interesting document by Uwe
Hello everybody,
I have a question about box-constrained optimization. I've done some
research and I found that optim could do that. Are there other ways in R ?
Is the following correct if I have a function f of two parameters belonging
for example to [0,1] and [0,Infinity] ?
optim(par=param, fn=
ins University
>
> Ph: (410) 502-2619
>
> Fax: (410) 614-9625
>
> Email: [EMAIL PROTECTED]
>
> Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html
>
>
>
>
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:
Hello everybody,
I have another question.
I have seen there is a function called "constrOptim" in R.
Is it better than "optim", for example to optimize a function f of two
parameters belonging to [0,1] and [0,Infinity] ? Do the methods
supplied like Nelder-Mead are better than those of optim ?
whether constrOptim is useful for
boundary problems, or if optim is sufficient for box-constrained
optimization.
Thank you.
2008/3/10, Paul Smith <[EMAIL PROTECTED]>:
>
> On Sun, Mar 9, 2008 at 9:10 PM, Gustave Lefou <[EMAIL PROTECTED]>
> wrote:
> > I have another que
Hello,
I wanted a function to have two vectors x,y as its output. I wrote
return(x,y) inside its definition. It worked but I got a warning : it is
obsolete to do like that.
So I tried to put x,y in a list(x,y) and to return(list(x,y)). It worked. I
called the return of the function result. But re
Thank you for that quick responses
2008/3/11, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> >From: Gustave Lefou <[EMAIL PROTECTED]>
> >Date: 2008/03/11 Tue PM 12:32:25 CDT
> >To: [EMAIL PROTECTED]
> >Subject: [R] Multi arguments - return
>
> if you'
Yep ! It works perfectly.
2008/3/11, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> >From: Gustave Lefou <[EMAIL PROTECTED]>
>
> >Date: 2008/03/11 Tue PM 12:57:59 CDT
> >To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>,
> Phil Spector <[EMA
Hello,
I would like to change my R language from German to French or English.
I have read messages in the archives and also R Installation and
Administration paragraph 7.2 but I did not get it all.
I have to set LANGUAGE=en (what would it be for French, "fr" ?), but I don't
know where.
I am unde
26 matches
Mail list logo