[R] Compilation of R under UBUNTU Edgy

2006-11-12 Thread Cressoni, Massimo \(NIH/NHLBI\) [F]
I am not able to compile R under ubuntu Edgy. ./configure error message is configure: error: --with-x=yes (default) and X11 headers/libs are not available I do not know which library is missing (I tried to install some X11 libs but were already on the system). Massimo Cressoni

Re: [R] postscript and histogram plots

2006-11-12 Thread Prof Brian Ripley
On Sat, 11 Nov 2006, Robert Mintram wrote: The following code plots a little histogram perfectly well under X on It is not reproducible: please see the footer of this message. the screen but when I use the postscript command (also shown) to send this to a file I get an incomplete

Re: [R] Compilation of R under UBUNTU Edgy

2006-11-12 Thread Prof Brian Ripley
On Sun, 12 Nov 2006, Cressoni, Massimo (NIH/NHLBI) [F] wrote: I am not able to compile R under ubuntu Edgy. ./configure error message is configure: error: --with-x=yes (default) and X11 headers/libs are not available I do not know which library is missing (I tried to install some X11 libs

Re: [R] Confidence interval for relative risk

2006-11-12 Thread Michael Dewey
At 15:54 10/11/2006, Viechtbauer Wolfgang (STAT) wrote: Thanks for the suggestion Wolfgang, but whatever the original authors did that is not it. Hello, A common way to calculate the CI for a relative risk is the following. Given a 2x2 table of the form: a b c d the log of the risk ratio is

Re: [R] Confidence interval for relative risk

2006-11-12 Thread Peter Dalgaard
Michael Dewey [EMAIL PROTECTED] writes: At 15:54 10/11/2006, Viechtbauer Wolfgang (STAT) wrote: Thanks for the suggestion Wolfgang, but whatever the original authors did that is not it. Did you ever say what result they got? -p Hello, A common way to calculate the CI for a

Re: [R] Confidence interval for relative risk

2006-11-12 Thread Michael Dewey
At 12:35 12/11/2006, Peter Dalgaard wrote: Michael Dewey [EMAIL PROTECTED] writes: At 15:54 10/11/2006, Viechtbauer Wolfgang (STAT) wrote: Thanks for the suggestion Wolfgang, but whatever the original authors did that is not it. Did you ever say what result they got? -p No,

Re: [R] Bayesian question (problem using adapt)

2006-11-12 Thread Thaden, John J
Is it possible there is a typo in your attached code? You wrote... loglik - function(theta, param) { sum(d1*log(hazard1(x1, param)) - chazard1(x1,param) + d2*log(hazard2(x2, theta, param)) - chazard2(x2, theta, param)) } / 1 Confidentiality Notice: This e-mail message, including any

Re: [R] Compilation of R under UBUNTU Edgy

2006-11-12 Thread Dirk Eddelbuettel
On 12 November 2006 at 09:22, Prof Brian Ripley wrote: | On Sun, 12 Nov 2006, Cressoni, Massimo (NIH/NHLBI) [F] wrote: | I am not able to compile R under ubuntu Edgy. | ./configure error message is | configure: error: --with-x=yes (default) and X11 headers/libs are not available | I do not

Re: [R] Compilation of R under UBUNTU Edgy

2006-11-12 Thread andrew rowland
On Sun, 12 Nov 2006, Cressoni, Massimo (NIH/NHLBI) [F] wrote: I am not able to compile R under ubuntu Edgy. ./configure error message is configure: error: --with-x=yes (default) and X11 headers/libs are not available I do not know which library is missing (I tried to install some X11

Re: [R] Confidence interval for relative risk

2006-11-12 Thread Spencer Graves
When I have refereed manuscripts for publication and have been unable to get their answers, I have told the authors they need more explanation of their methodology -- while summarizing what I tried in a few lines. I've even told some that it would make it vastly easier for the referees

Re: [R] POSIXlt converted to POSIXct in as.data.frame()

2006-11-12 Thread Spencer Graves
I'm not qualified to say much about POSIX, but I haven't seen a reply to this in almost 3 days, so I'll offer a comment in the hopes that it might be useful or that someone else might correct any misstatement I might make: First, I didn't find a discrepancy. sessionInfo() R

Re: [R] Problems with metaMDS from vegan

2006-11-12 Thread Spencer Graves
Have you sent this question to the vegan maintainer, identified, e.g., with help(package=vegan)? I've added that name as a cc to this email. Hope this helps. Spencer Graves Peter Roosen wrote: Hello all, I recently used the Vegan library quite extensively (in the

[R] How to increase decimal places

2006-11-12 Thread Maja Schröter
Hello everyone, does anybody know how to increase the decimal places that R uses to calculate something. I think that in default R uses 6 decimal places but I need 12. Thank you very much! Best regards, Maja! -- __ R-help@stat.math.ethz.ch mailing

Re: [R] Compilation of R under UBUNTU Edgy

2006-11-12 Thread Dirk Eddelbuettel
On 12 November 2006 at 10:11, andrew rowland wrote: | On Sun, 12 Nov 2006, Cressoni, Massimo (NIH/NHLBI) [F] wrote: | | | I am not able to compile R under ubuntu Edgy. | ./configure error message is | configure: error: --with-x=yes (default) and X11 headers/libs are not available | I

Re: [R] How to increase decimal places

2006-11-12 Thread Philipp Pagel
On Sun, Nov 12, 2006 at 07:32:49PM +0100, Maja Schröter wrote: does anybody know how to increase the decimal places that R uses to calculate something. I think that in default R uses 6 decimal places but I need 12. What you are experiencing is R PRINTING only a certain number of digits. All

Re: [R] Value at Risk historical simulation

2006-11-12 Thread Spencer Graves
Have you looked at the 'VaR' package? If nothing in this package seems adequate for your purposes, please provide minimal, self-contained, reproducible code while explaining what it seems to lack, etc., as suggested in the posting guide www.R-project.org/posting-guide.html. Hope

Re: [R] help with nlme function

2006-11-12 Thread Spencer Graves
The primary (if not the only) documentation for the 'nlme' function, beyond that in the 'nlme' package, is Pinheiro and Bates. Your example is not self contained, which makes it not feasible for me to say much about your problem. Have you tried to reduce the size and complexity

[R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Barnet Wagman
I encountered a segfault running glm() and wonder if it could have something to do with the way memory is handled in a dual core system (which I just set up). I'm running R-base-2.4.0-1, installed from the SuSE 10.1 x86_64 rpm (obtained from CRAN). (My processor is an AMD Athlon 64 x2 4800+).

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Peter Dalgaard
Barnet Wagman [EMAIL PROTECTED] writes: I encountered a segfault running glm() and wonder if it could have something to do with the way memory is handled in a dual core system (which I just set up). I'm running R-base-2.4.0-1, installed from the SuSE 10.1 x86_64 rpm (obtained from CRAN).

Re: [R] Problems with metaMDS from vegan

2006-11-12 Thread Peter Roosen
Hello Spencer, Have you sent this question to the vegan maintainer, identified, e.g., with help(package=vegan)? I wrote a mail directly to Jari prior to posting in this group. My posting here was no sooner than waiting (in vain) for an answer for about a week. I've added that name

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Peter Dalgaard
Benilton Carvalho [EMAIL PROTECTED] writes: I had a similar problem, but with the silhouette() function. I figured that the function expected that the grouping variable started from 1, ie., if for some reason on my obs I didn't have any observation on group 1, the function would return

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Barnet Wagman
It's highly unlikely that the dual core has anything to do with it unless your system is overheating or has a hardware problem. Instead, see if you can create a script that reproduces the issue (if random numbres are involved, use set.seed) and/or run R with the -d gdb switch on and see if

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Jeffrey Robert Spies
What failed for you did not fail for me. version _ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R Just to help bound the problem,

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Peter Dalgaard
Benilton Carvalho [EMAIL PROTECTED] writes: On Nov 12, 2006, at 3:35 PM, Peter Dalgaard wrote: My fix was to remap my group variable so that it would always start from 1. Ugh! You shouldn't fix something like that, instead try your very best to find circumstances where you

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Peter Dalgaard
Barnet Wagman [EMAIL PROTECTED] writes: It's highly unlikely that the dual core has anything to do with it unless your system is overheating or has a hardware problem. Instead, see if you can create a script that reproduces the issue (if random numbres are involved, use set.seed)

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Benilton Carvalho
Mea culpa. Please accept my apologies... The problem was fixed on R-2.4.0 (final) and what I reported was on R-2.4.0 alpha. Good job of Martin, by the way... The problem was fixed and I didn't notice (given that I was always using my work-around). benilton

Re: [R] Problems with metaMDS from vegan

2006-11-12 Thread Spencer Graves
Three more suggestions: 1. Have you tried to develop an example so small and simple that it can be provided with a few lines of code in an email like this (as suggested in the trailer to every email distributed by r-help)? If you include an example like that, it will increase

Re: [R] Variable limit in nlm?

2006-11-12 Thread Spencer Graves
Since no one has replied in 2 days, I will offer comments: 1. Your example is not self contained. When I copied your code into R 2.4.0 and tried it just now, I got 'Error in fnoise(y) : object y not found'. I don't know the answer to your question, and I don't know how I can

[R] looking for functions that can test/estimate CAMPM, APT, Fama's factor model, etc.

2006-11-12 Thread Michael
Hi all, I am also looking for interesting statistical experiments about testing and estimating CAPM, APT, Fama models, etc. using R using financial series data... please give me some pointers... I have been searching the R archives for the past a few hours and I vaguely got to know that there are

Re: [R] looking for functions that can test/estimate CAMPM, APT, Fama's factor model, etc.

2006-11-12 Thread Leeds, Mark \(IED\)
you should also write to the r-finance special interest group. also, you can do all that stuff yourself using the R tools/functions etc but I don't know of such functions have already been written. joe byers may be able to answer the question. my guess is that, if these sort of things have been

[R] I think a simple question

2006-11-12 Thread Leeds, Mark \(IED\)
I have index ( of a vector ) values of say tempin-c(1 31 61 91 121 all the way upto 1411) What I want is a function that takes in a number say, x = 5, and gives me an new vector of tempout-1 6 31 36 91 96 121 126 .. 1411 1416 This can't be so hard but I can't get it and

Re: [R] I think a simple question

2006-11-12 Thread Benilton Carvalho
does getIdx - function(tmpin, x){ tmp2 = tmpin + x out = sort(c(tmpin, tmp2)) out = out[out=max(tmpin)] return(out) } do what you want? b On Nov 12, 2006, at 5:20 PM, Leeds, Mark ((IED)) wrote: I have index ( of a vector ) values of say tempin-c(1 31 61 91 121 all the way

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
tempin - seq(1, 1411, by=30) tempout - array(data=NA, dim=length(tempin)*2) tempout[seq(1,length(tempin)*2, by=2)]-tempin tempout[seq(2,length(tempin)*2, by=2)]-tempin+5 Is this what you're looking for? Jeff. On Nov 12, 2006, at 5:20 PM, Leeds, Mark (IED) wrote: I have index ( of a vector )

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Funciton form: everyOther - function(tempin, x){ tempout[seq(1,length(tempin)*2, by=2)]-tempin tempout[seq(2,length(tempin)*2, by=2)]-tempin+x tempout } Jeff. On Nov 12, 2006, at 5:31 PM, Jeffrey Robert Spies wrote: tempin - seq(1, 1411, by=30) tempout -

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Sorry to hit the list three times in a row, but forgot to create the array in the function; note, always test after doing rm(list=ls()). everyOther - function(tempin, x){ tempout - array(data=NA, dim=length(tempin)*2) tempout[seq(1,length(tempin)*2, by=2)]-tempin

Re: [R] I think a simple question

2006-11-12 Thread Gavin Simpson
On Sun, 2006-11-12 at 17:20 -0500, Leeds, Mark (IED) wrote: I have index ( of a vector ) values of say tempin-c(1 31 61 91 121 all the way upto 1411) What I want is a function that takes in a number say, x = 5, and gives me an new vector of tempout-1 6 31 36 91 96 121 126

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Note, the wrapped sort is a really tight solution but won't necessarily always give you an intertwined array. For example, if x=31 (or basically, tempin[2] or greater), then you would get 1, 31, 32, etc. instead of 1, 32, 31 Depends on what you were looking for. Jeff. On Nov 12,

Re: [R] I think a simple question

2006-11-12 Thread Gavin Simpson
On Sun, 2006-11-12 at 22:45 +, Gavin Simpson wrote: On Sun, 2006-11-12 at 17:20 -0500, Leeds, Mark (IED) wrote: I have index ( of a vector ) values of say tempin-c(1 31 61 91 121 all the way upto 1411) What I want is a function that takes in a number say, x = 5, and gives

Re: [R] I think a simple question

2006-11-12 Thread Peter Dalgaard
Leeds, Mark (IED) [EMAIL PROTECTED] writes: I have index ( of a vector ) values of say tempin-c(1 31 61 91 121 all the way upto 1411) What I want is a function that takes in a number say, x = 5, and gives me an new vector of tempout-1 6 31 36 91 96 121 126 .. 1411

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Much more elegant! Is there a way, from the documentation, we would know that c() and lists in general behave as they do in these two lines? Jeff. On Nov 12, 2006, at 6:32 PM, Peter Dalgaard wrote: One way is c(rbind(tempin,tempin+5)) another is rep(tempin, each=2) + c(0,5)

[R] Computing time for matrix addition or subtraction

2006-11-12 Thread YONGWAN CHUN
Hello, I wonder by chance if there is a way to reduce computing time for matrix addition or subtraction. With a lot of iterations, it would be helpful to reduce a little amount time. Simple example is as below n - 2000 P - matrix(rnorm(n*n),n,n) PP - P %*% P M - diag(n) - P R - M + t(M) -

Re: [R] Computing time for matrix addition or subtraction

2006-11-12 Thread Gabor Grothendieck
This is slightly faster but not by much: ad - function(m, a) { diag(m) - diag(m) + a; m } R - ad(P %*% P - t(P) - P, 1) On 11/12/06, YONGWAN CHUN [EMAIL PROTECTED] wrote: Hello, I wonder by chance if there is a way to reduce computing time for matrix addition or subtraction. With a lot of