Re: [R] A mistake in garchFit()? {fGarch}

2009-01-03 Thread Yohan Chalabi
TY == Ted Young unixuni...@gmail.com on Tue, 30 Dec 2008 11:53:23 -0800 (PST) TY TY Hello, TY TY I was using garchFit {fGarch} to fit some GARCH processes. TY I noticed that the result contains Log Likelihood value TY (right above TY Description), but when I use @fit to

[R] R Stacked Histogram

2009-01-03 Thread Jason Rupert
I've seen this asked, but never fully answered.  Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format.  Is this possible?  Thank you for any feedback you can provide. P.S. I know I can show the four sets

[R] R help and finishing an excel project

2009-01-03 Thread Ray Mota
Hi Yuzhi...I'm not sure if you company gets involve with small project-but I figure I send the e-mail and maybe you could point me in the right direction. We are a small technology research firm and we do market shares and market sizing. We wanted to automate teh process better. We had

Re: [R] segfault while running an R script

2009-01-03 Thread mauede
I have installed R-2.8.1 right now and will proceed with my tests. So far I haven't used it. The fault is presumably caused by a sort of misuse of the memory on my part. The attached R script (whose last Step is not debugged yet) implements the algorithm for signal features extraction described in

[R] How to capture multiple graph pages to .png ?

2009-01-03 Thread Mike Williamson
Hello all and thanks in advance for any help, There are really two issues that I am having, both related to saving graphs: 1) It seems that the dev...() functions are unstable when using higher level graphs (specifically I was using levelplot) 2) I have a large grid of levelplot graphs that

Re: [R] R Stacked Histogram

2009-01-03 Thread hadley wickham
On Fri, Jan 2, 2009 at 11:00 PM, Jason Rupert jasonkrup...@yahoo.com wrote: I've seen this asked, but never fully answered. Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format. Is this possible? Yes, but

Re: [R] R Stacked Histogram

2009-01-03 Thread John Kane
Is this of any help? http://www.cse.unsw.edu.au/~mike/myrlibrary/geneplotter/html/histStack.html --- On Sat, 1/3/09, Jason Rupert jasonkrup...@yahoo.com wrote: From: Jason Rupert jasonkrup...@yahoo.com Subject: [R] R Stacked Histogram To: r-help@r-project.org Received: Saturday, January 3,

Re: [R] runif (and other generator) precision / man pages

2009-01-03 Thread John C Nash
I'm inclined to agree with the view that the precision of a generator should be highlighted better in the manual pages. When I do ?runif I don't see a mention, but ?.Random.seed DOES give the info, as Duncan points out, and it is suggested to look there. A 1-liner with each random number

Re: [R] How to capture multiple graph pages to .png ?

2009-01-03 Thread jim holtman
W.R.T. multiple pages, the HELP page says to use a filename like this: png(filename = Rplot%03d.png, where %03d is an incremented value for each page. On Fri, Jan 2, 2009 at 2:23 PM, Mike Williamson this.is@gmail.com wrote: Hello all and thanks in advance for any help, There are

Re: [R] How to capture multiple graph pages to .png ?

2009-01-03 Thread Mike Williamson
Jim, Thanks so much! I feel kinda stupid now. I read that part, but I didn't really get what it was talking about... despite the fact that I am fairly familiar with the %d syntax when setting up formatting. Regards,

[R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
Here's a small R program: --- a - rep(1,1000) system.time(a - a + 1) system.time(for (i in 1:1000) {a[i] - a[i] + 1}) --- and here's its

Re: [R] runif (and other generator) precision / man pages

2009-01-03 Thread Ben Bolker
John C Nash nashjc at uottawa.ca writes: I'm inclined to agree with the view that the precision of a generator should be highlighted better in the manual pages. When I do ?runif I don't see a mention, but ?.Random.seed DOES give the info, as Duncan points out, and it is suggested to

Re: [R] Calculating signicance value

2009-01-03 Thread Ben Bolker
Moumita Das das.moumita.online at gmail.com writes: [snip snip snip] But how do i get significance of e say:-- recmeanC1recmeanC2 or say recmeanC1 i1. I can add this in my corr function shown above but: #Finding out significance of the two items whose correlations are being found

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Stefan Grosse
On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah ajays...@mayin.org wrote: AS system.time(for (i in 1:1000) {a[i] - a[i] + 1}) AS I wonder what we're doing wrong! it is no secret that R does badly with loops. Thats why it is recommended to use vectorized operations. Another approach is just in

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ben Bolker
Ajay Shah ajayshah at mayin.org writes: Here's a small R program: --- a - rep(1,1000) system.time(a - a + 1) system.time(for (i in 1:1000) {a[i] - a[i] + 1})

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
On Sat, Jan 03, 2009 at 06:59:29PM +0100, Stefan Grosse wrote: On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah ajays...@mayin.org wrote: AS system.time(for (i in 1:1000) {a[i] - a[i] + 1}) AS I wonder what we're doing wrong! it is no secret that R does badly with loops. Thats why it is

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ben Bolker
Ajay Shah ajayshah at mayin.org writes: On Sat, Jan 03, 2009 at 06:59:29PM +0100, Stefan Grosse wrote: On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah ajayshah at mayin.org wrote: AS system.time(for (i in 1:1000) {a[i] - a[i] + 1}) AS I wonder what we're doing wrong! it is no

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
As for jit and Ra, that was immediate reaction too but I found that jit does not help on your example. But I concur fully with what Ben said --- use the tool that is appropriate for the task at hand. If your task is running for loops, Matlab does it faster and you have Matlab, well then you

[R] passing parameters to an R script

2009-01-03 Thread mauede
I knowf R functions ca be called passing some parameters. My first question is: how are parameters passed to R functions ? Browsing through R archives I found an answer confirming taht parameters can be passed to the called function by value. I wonder whether passing the parameter address is

[R] hexbin plot

2009-01-03 Thread Rodrigo Fernandes Ramalho
Hello, I would like some help to plot a vertical line on a scatterplot build with hexbin package. I just need to plot a vertical line on the graph to mark a threshold value on x axis. It would be better if the parameter of the plot line function respect the x axis scale. Thanks, Rodrigo

[R] how specify lme() with multiple within-subject factors?

2009-01-03 Thread Ben Meijering
I have some questions about the use of lme(). Below, I constructed a minimal dataset to explain what difficulties I experience: # two participants subj - factor(c(1, 1, 1, 1, 2, 2, 2, 2)) # within-subjects factor Word Type wtype - factor(c(nw, w, nw, w, nw, w, nw, w)) # within-subjects factor

[R] Non-Latin labels in identify

2009-01-03 Thread Aleksandr Andreev
Greetings. I'm trying to label some points using the identify() command. The labels and the coordinates are coming from a csv file. The file encoding is UTF-8. If I use labels in Latin characters, everything comes out OK. But when I switch to using labels in Cyrillic, I get garbage. To check

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ted Harding
On 03-Jan-09 18:28:03, Ben Bolker wrote: Ajay Shah ajayshah at mayin.org writes: On Sat, Jan 03, 2009 at 06:59:29PM +0100, Stefan Grosse wrote: On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah ajayshah at mayin.org wrote: AS system.time(for (i in 1:1000) {a[i] - a[i] + 1}) AS I

Re: [R] extend summary.lm for hccm?

2009-01-03 Thread John Fox
Dear Achim, I suspect that the problem, involving a fifth-degree raw polynomial, is very ill-conditioned, and that the computation in linear.hypothesis() fails because it is not as stable as lm() and summary.lm(). (BTW, one would not normally call summary.lm() directly, but rather use the generic

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread hadley wickham
On Sat, Jan 3, 2009 at 12:37 PM, Ajay Shah ajays...@mayin.org wrote: As for jit and Ra, that was immediate reaction too but I found that jit does not help on your example. But I concur fully with what Ben said --- use the tool that is appropriate for the task at hand. If your task is running

Re: [R] passing parameters to an R script

2009-01-03 Thread jim holtman
No you can not pass an address to a function. If you want to change the value of something, then return it as a value and assign it to the object so you can see what is going on. Must be coming from the C environment where such things are allowed and lead to a number of problems. If you really

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Stefan Grosse
I don't have octave (on the same machine) to compare these with. And I don't have MatLab at all. So I can't provide a comparison on that front, I'm afraid. Ted. Just to add some timings, I was running 1000 repetitions (adding up to a=1001) on a notebook with core 2 duo T7200 R 2.8.1 on

Re: [R] passing parameters to an R script

2009-01-03 Thread Stavros Macrakis
R's variable passing mechanism is not call by value, but a mixture of unevaluated arguments (like the obsolete Lisp FEXPR) and call-by-need. It is like FEXPR in that the function can capture the unevaluated argument (using 'substitute'). But it is like call-by-need in that normal use of the

[R] R: passing parameters to an R script

2009-01-03 Thread mauede
Thank you. You're right. I come from C and C++ programming. I wonder whether to pass parameters to an R script I have to set environment variables ... ? Best regards, Maura -Messaggio originale- Da: jim holtman [mailto:jholt...@gmail.com] Inviato: sab 03/01/2009 21.12 A:

[R] Power functions?

2009-01-03 Thread rkevinburton
I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but also -1^3 [1] -1 -0.1^2 [1] -0.01 Normally pow(-1, 2) return either -Infinity or NaN. Has R taken over the math functions? If so I would think that -1^2 is 1 not -1 and -0.1^2

[R] Linux words file

2009-01-03 Thread Erin Hodgess
Dear R People: I have a small function that solves the Jumble puzzle from the newspaper (I know...big deal). It uses the the Linux words file. My question is: is there a similar words file for Windows, please? Thanks, Happy New (Gnu) Year. Sincerely, Erin -- Erin Hodgess Associate

Re: [R] Power functions?

2009-01-03 Thread Prof Brian Ripley
Please post to only one of r-help@r-project.org r-h...@stat.math.ethz.ch not to both, as the same list then got two copies. On Sat, 3 Jan 2009, rkevinbur...@charter.net wrote: I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but

Re: [R] Linux words file

2009-01-03 Thread Duncan Murdoch
On 03/01/2009 4:39 PM, Erin Hodgess wrote: Dear R People: I have a small function that solves the Jumble puzzle from the newspaper (I know...big deal). It uses the the Linux words file. My question is: is there a similar words file for Windows, please? As far as I know Windows doesn't

Re: [R] Power functions?

2009-01-03 Thread Stavros Macrakis
Watch the operator precedences. In R (and many other languages) -1^2 == -(1^2) == -1 Perhaps you intended: (-1)^2 == 1 On Sat, Jan 3, 2009 at 3:32 PM, rkevinbur...@charter.net wrote: I had a question about the basic power functions in R. For example from the R console I enter:

Re: [R] Power functions?

2009-01-03 Thread YH Deng
(-1)^2 Or a - -1 a^2 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of rkevinbur...@charter.net Sent: January 3, 2009 3:33 PM To: r-help@r-project.org; r-h...@stat.math.ethz.ch Subject: [R] Power functions? I had a question about the

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Wacek Kusnierczyk
(Ted Harding) wrote: On 03-Jan-09 18:28:03, Ben Bolker wrote: Ajay Shah ajayshah at mayin.org writes: On Sat, Jan 03, 2009 at 06:59:29PM +0100, Stefan Grosse wrote: On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah ajayshah at mayin.org wrote: AS system.time(for (i in

Re: [R] Power functions?

2009-01-03 Thread Marc Schwartz
on 01/03/2009 02:32 PM rkevinbur...@charter.net wrote: I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but also -1^3 [1] -1 -0.1^2 [1] -0.01 Normally pow(-1, 2) return either -Infinity or NaN. Has R taken over the

Re: [R] Power functions?

2009-01-03 Thread Wacek Kusnierczyk
rkevinbur...@charter.net wrote: I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but also -1^3 [1] -1 -0.1^2 [1] -0.01 Normally pow(-1, 2) return either -Infinity or NaN. Has R taken over the math functions? If so I

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Wacek Kusnierczyk
Ajay Shah wrote: As for jit and Ra, that was immediate reaction too but I found that jit does not help on your example. But I concur fully with what Ben said --- use the tool that is appropriate for the task at hand. If your task is running for loops, Matlab does it faster and you have

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Duncan Murdoch
On 03/01/2009 1:37 PM, Ajay Shah wrote: As for jit and Ra, that was immediate reaction too but I found that jit does not help on your example. But I concur fully with what Ben said --- use the tool that is appropriate for the task at hand. If your task is running for loops, Matlab does it

Re: [R] Linux words file

2009-01-03 Thread Ted Harding
On 03-Jan-09 21:39:55, Erin Hodgess wrote: Dear R People: I have a small function that solves the Jumble puzzle from the newspaper (I know...big deal). It uses the the Linux words file. My question is: is there a similar words file for Windows, please? Thanks, Happy New (Gnu) Year.

[R] [R-pkgs] RQDA-0.1-6 is on CRAN

2009-01-03 Thread ronggui
Major new features of RQDA-0.1-6: GUI: * GUI for file-organization (e.g searching, categorization etc.). * GUI for settings (e.g. colors for ) Functions: * Import a batch of files * Calculate the relation between two codings, given the coding index * Gives a summary of coding and inter-code

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread luke
On Sat, 3 Jan 2009, Duncan Murdoch wrote: On 03/01/2009 1:37 PM, Ajay Shah wrote: As for jit and Ra, that was immediate reaction too but I found that jit does not help on your example. But I concur fully with what Ben said --- use the tool that is appropriate for the task at hand. If your

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Dirk Eddelbuettel
On 3 January 2009 at 18:02, l...@stat.uiowa.edu wrote: | The current byte code compiler available from my web site speeds this | (highly artificial) example by about a factor of 4. The experimental | byte code engine I am currently working on (and that can't yet do much | more than an example

[R] POSIXct and chron issues with tz

2009-01-03 Thread Sherri Heck
Dear All- I am trying to merge two data files - they have different date formats and different times zones. I need to match up the date/time of the datasets and then invoke a conditional statement, such as: if dataC$mph is = 12 then keep dataM$co23 for the corresponding time/date stamp.

Re: [R] R: passing parameters to an R script

2009-01-03 Thread jim holtman
?commandArgs On Sat, Jan 3, 2009 at 4:17 PM, mau...@alice.it wrote: Thank you. You're right. I come from C and C++ programming. I wonder whether to pass parameters to an R script I have to set environment variables ... ? Best regards, Maura -Messaggio originale- Da: jim

Re: [R] POSIXct and chron issues with tz

2009-01-03 Thread Gabor Grothendieck
There seems to be no reason to use POSIXct in the first place. Just use chron everywhere and read R News 4/1. Suppose we just want month 9 from the merged object: z2 - zoo(data.matrix(DF), tt) m - merge(z, z2, all = c(FALSE, TRUE)) m[ m$mon %in% 9 ] On Sat, Jan 3, 2009 at 7:57 PM, Sherri Heck

Re: [R] Newbie question

2009-01-03 Thread cruz
abntest[abntest$abntesr 90,] On Sun, Jan 4, 2009 at 11:55 AM, greggal...@gmail.com wrote: Hi: I'm loading in students test scores with: abntest - read.table(scores.txt) if I type: abntest I get ALL the values. I want to be able to filter it by various things such as: if(

[R] How do I find the index for a value in an array

2009-01-03 Thread George Chen
Hello, Could anybody tell me how to find the index for a value which I define in an array? ie. c-matrix(1:9,1,9) #A 1x9 matrix filled with numbers 1 - 9 in order I want to know the index for the value 5. Thanks in advance, George Chen __

Re: [R] How do I find the index for a value in an array

2009-01-03 Thread Jorge Ivan Velez
Dear George, Try this: mat-matrix(1:9,1,9) which(mat==5,arr.ind=TRUE) row col [1,] 1 5 HTH, Jorge On Sun, Jan 4, 2009 at 1:21 AM, George Chen glc...@stanford.edu wrote: Hello, Could anybody tell me how to find the index for a value which I define in an array? ie.