Re: [R] Code in lattice::dotplot function.

2005-08-26 Thread Ernesto Jardim
Deepayan Sarkar wrote:

On 8/25/05, ernesto [EMAIL PROTECTED] wrote:
  

Hi,

I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this is needed can someone help ?



It was a hack to enable usage of the form dotplot(x). The latest
version of lattice does not use this sort of construct any more
(replacing it by generics and methods).

Deepayan
  

OK, thanks.

EJ

__
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] Code in lattice::dotplot function.

2005-08-25 Thread ernesto
Hi,

I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this is needed can someone help ?

Thanks

EJ

[...]

right.name - deparse(substitute(formula))
try(formula - eval(formula), silent = TRUE)
foo - substitute(formula)

if (!(is.call(foo)  foo[[1]] == ~)) {
formula - as.formula(paste(~, right.name)) #   deparse(foo)))
environment(formula) - parent.frame()
}

[...]

__
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] Code in lattice::dotplot function.

2005-08-25 Thread Deepayan Sarkar
On 8/25/05, ernesto [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm trying to understand the code of lattice functions so that I can
 write some S4 methods using lattice. The following code is a snipet of
 dotplot that is reused in several other functions. I don't understand
 why this is needed can someone help ?

It was a hack to enable usage of the form dotplot(x). The latest
version of lattice does not use this sort of construct any more
(replacing it by generics and methods).

Deepayan

__
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