Dear Yuandan,

The function definition given in the article doesn't produce an error for
me.

Regards,
 John

--------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: Lux Zhang [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 26, 2007 7:56 AM
> To: John Fox
> Cc: R-help
> Subject: Re: [R] R News, volume 7,issue 1 is now available 
> --error in AMMI article
> 
> 
> 
> On 26/04/07, Lux Zhang <[EMAIL PROTECTED]> wrote:
> 
> 
> 
>       On 26/04/07, John Fox <[EMAIL PROTECTED] > wrote:
> 
>               Dear Yuandan,
>               
>               My attention was drawn by your claim of an 
> "error in AMMI article."
>               
>               As you say, the code for the AMMI function is 
> given directly in the article.
>               If the argument biplot is equal to 1, then a 
> biplot is drawn by the 
>               function, as is apparent from the section of 
> code labelled "## 5 - Biplots."
>               
>               Why is this an error?
> 
> 
> 
>       when loading this AMMI function, at the line "if 
> (biplot == 1) { ", R seems treating the 'biplot' as a 
> subject, the biplot function from stats package, inseatd of 
> treating it as argument for the AMMI function. 
>       
>       
>       here is the error messenge when I load it
>       
>       > source ("AMMI.R")
>       Error in parse(file, n = -1, NULL, "?") : syntax error at
>       51: ( bplot == 1 ) {
>       52:     plot(1, type = 
> 
> 
> Sorry, I had another look, it seems something to do with plot 
> (1, type = 'n' ... [ i copy this code from the pdf file]
> 
> after change it to 
> 
> plot (1, type = "n" ... as below 
> 
>   if ( biplot == 1 ) {
>     plot(1, type = "n", xlim = range(c(envir.mean, 
> var.mean)), ylim = range(c(E[,1], G[,1])), xlab = "Yield",
> 
> lt was loaded. 
> 
> 
> 
>  
> 
> 
>       
> 
>               Regards,
>               John
>               
>               -------------------------------- 
>               John Fox, Professor
>               Department of Sociology
>               McMaster University
>               Hamilton, Ontario
>               Canada L8S 4M4
>               905-525-9140x23604
>               http://socserv.mcmaster.ca/jfox 
> <http://socserv.mcmaster.ca/jfox> 
>               -------------------------------- 
>               
>               > -----Original Message-----
>               > From: [EMAIL PROTECTED]
>               > [mailto: [EMAIL PROTECTED] ] 
> On Behalf Of Lux Zhang
>               > Sent: Thursday, April 26, 2007 1:38 AM
>               > To: R-help; [EMAIL PROTECTED] 
>               > Subject: Re: [R] R News, volume 7,issue 1 is 
> now available 
>               > --error in AMMI article
>               >
>               > Hi,
>               >
>               > In this newsletter (Vol 7, 1),the article on 
> AMMI by Onofri
>               > and Ciriofolo presented a AMMI function.  One 
> of arguments
>               > for this function AMMI (Page 
>               > 17) is biplot. There is a biplot fucntion 
> from  {stats}
>               > package.  I guess they are not the same. 
> Could the authors
>               > clarify that?
>               >
>               > Thanks,
>               >
>               > Yuandan
>               >
>               >       [[alternative HTML version deleted]] 
>               >
>               > ______________________________________________
>               > [email protected] mailing list 
>               > https://stat.ethz.ch/mailman/listinfo/r-help 
>               > PLEASE do read the posting guide
>               > http://www.R-project.org/posting-guide.html 
>               > and provide commented, minimal, 
> self-contained, reproducible code. 
>               >
>               
>               
>               
> 
> 
> 
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to