Re: [R] Linux editor like WinEdt?

2006-03-10 Thread Randall R Schulz
Ana,

On Friday 10 March 2006 08:52, Ana Patricia Martins wrote:
> Hi to all,
>
> I initiate in R - Linux and I've some problems to find an editor with
> R interface as like RWinEdt for WinEdt.
>
> Anyone know one?

I believe Kile would be the closest counterpart, especially if you're 
interested in the TeX affinity that is WinEdt's raison d'etre.

  


> ...
>
> Ana Patricia Martins


Randall Schulz

__
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


Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris,

On Monday 26 September 2005 07:16, Dimitris Rizopoulos wrote:
> Randall,
>
> thanks for your comments; however, you have to take into account what
> is the purpose of the function here! The goal is to approximate
> *partial* derivatives numerically, ...
>
> I hope it is more clear now.

Yes. Thanks for clearing up my misunderstanding.


> Best,
> Dimitris


Randall Schulz

__
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


Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris,

I'm new to R programming, and I'm trying to learn the proper way to do 
certain things. E.g., I had a piece of code with explicit iteration to 
apply some computations to a vector. It was pretty slow. I found a way 
to utilize R's built-in vectorization and it was sped up considerably.

So I want to ask about the code you supplied. Please see below.

(By the way, this message is best viewed using a mono-spaced font.)


On Sunday 25 September 2005 04:07, Dimitris Rizopoulos wrote:
> maybe you can find the following function useful (any comments are
> greatly appreciated):
>
> fd <- function(x, f, scalar = TRUE, ..., eps =
> sqrt(.Machine$double.neg.eps)){
> f <- match.fun(f)
> out <- if(scalar){
> ...
> } else{
> n <- length(x)
> res <- array(0, c(n, n))
> f0 <- f(x, ...)
> ex <- pmax(abs(x), 1)
> for(i in 1:n){

This (following) statement will create a copy of the entire "x" vector 
on each iteration. It doesn't look like that's what you would want to 
do:

> x. <- x

The computation described by this statement could be vectorized outside 
the loop:

> x.[i] <- x[i] + eps * ex[i]

> res[, i] <- c(f(x., ...) - f0) / (x.[i] - x[i])
> }
> res
> }
> out
> }

Offhand, I cannot tell for sure if the last line of that loop is 
vectorizable, but I have a hunch it is.

So at a minimum, it seems this fragment of your code:

        for(i in 1:n){
            x. <- x
            x.[i] <- x[i] + eps * ex[i]
            res[, i] <- c(f(x., ...) - f0) / (x.[i] - x[i])
        }

Could be more efficiently and succinctly replaced with this:

x. <- x + eps * ex
for (in in 1:n)
res[, i] <- c(f(x., ...) - f0) / (x.[i] - x[i])


Could your someone else with R programming experience comment?


Thanks.


Randall Schulz

__
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


Re: [R] [R-pkgs] Reshape package: new version 0.5

2005-09-23 Thread Randall R Schulz
Sundar,

On Friday 23 September 2005 06:48, Sundar Dorai-Raj wrote:
> Randall R Schulz wrote:
> > Hadley,
> >
> > ...
> >
> > Perhaps I'm dense, but I cannot find the software at the URL you
> > mention. There are links to a paper and a PDF slide presentation,
> > but no R package.
> >
> > There is also a dangling link (<http://r-project.org/>) in the
> > first sentence.
>
> Hi, Randall,
>
> The first section of the webpage says:
>
> 
> How to install
>
> install.packages("reshape")
> 

Yes, of course I saw that.


> Try the latter call at the R prompt.

Huh? All the other packages I've installed, and there have been several, 
I've downloaded from CRAN and used:

% R CMD INSTALL packageName.tar.gz


How am I to do that when I don't have the package. Where is going to 
come from?

But now I see that there is a "reshape" package in CRAN.

I figured (yes, assumed) that since no mention of CRAN was made at the 
author's Web page that this release was not distributed there.


> HTH,
>
> --sundar


Randall Schulz

__
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


Re: [R] [R-pkgs] Reshape package: new version 0.5

2005-09-23 Thread Randall R Schulz
Hadley,

On Thursday 22 September 2005 16:36, hadley wickham wrote:
> Reshape version 0.5
> ===
>
> Reshape is an R package for flexibly restructuring and aggregating
> data.  It's very much pivot table inspired, and it (hopefully) makes
> it very easy to view your data the way you want.  You can find out
> more at http://had.co.nz/reshape
>
> ...
>
> Please let me know what you think.

Perhaps I'm dense, but I cannot find the software at the URL you 
mention. There are links to a paper and a PDF slide presentation, but 
no R package.

There is also a dangling link () in the first 
sentence.


> Regards,
>
> Hadley


Randall Schulz

__
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


Re: [R] warning.expression?

2005-09-22 Thread Randall R Schulz
Thomas,

On Thursday 22 September 2005 10:00, Thomas Friedrichsmeier wrote:
> > You might be interested in 'tryCatch' to catch warnings.
>
> Yes, thanks for pointing it out. However, I'm actually looking for a
> way to catch all warnings in a whole (interactive) session. Can
> warning.expression be used for that?

Please permit, if you will, some feedback from someone who is quite 
uneducated in R, at least so far, but who has a lot of general 
programming background.

I'm afraid this does not make sense to me. An "interactive session" is 
not some monolithic blob. It is a sequence of one or more (often very 
many) discreet interactions. Any one of these may produce an 
exceptional condition, and it seems to me that each individual 
interaction that elicits an exception should be handled independently 
and if it does produce an exceptional condition, that should be 
reported as soon as it occurs. Things should then be cleaned up, as 
necessary and feasible, and the interactive session should be allowed 
to continue.

Does this make sense? Or am I misunderstanding your use case?


> Thomas


Randall Schulz

__
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


Re: [R] R Reference Card (especially useful for Newbies)

2005-09-16 Thread Randall R Schulz
Bert,

On Friday 16 September 2005 08:21, Berton Gunter wrote:
> Newbies (and others!) may find useful the R Reference Card made
> available by Tom Short and Rpad at
> http://www.rpad.org/Rpad/Rpad-refcard.pdf  or through the
> "Contributed" link on CRAN (where some other reference cards are also
> linked).

This is truly handy. Thanks for pointing it out.

It's too bad there are five orphaned lines of text on an otherwise blank 
page five. Do you or does anyone know of a way to reformat this 
reference card to fit on four pages? Is the original TeX available?

> ...
>
> -- Bert Gunter


Again, thanks for the pointer.

Randall "Rnewbie" Schulz

__
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