Re: [R] if syntax error :(

From: Gabor Csardi <csardi_at_rmki.kfki.hu>
Date: Wed 14 Jun 2006 - 04:39:59 EST

replace 'else' with '} else {'

Gabor

On Tue, Jun 13, 2006 at 11:18:00AM -0700, H. Paul Benton wrote:
> Umm sorry to bother everyone again but I'm having trouble with my if
> statement. I come from a perl background so that's probably my problem! :)
> So here is my code:
>
> if (any(lgAB>4) | any(lgAB<-4)){
> freq_AB<-hist(lgAB, type="o", plot=F)
> else
> freq_AB<-hist(lgAB, breaks=br,type ="o", plot=F)
> }
>
> And I get
> > source("E:/R/GMDA-1.1.R")
> Error in parse(file, n = -1, NULL, "?") : syntax error at
> 11: freq_AB<-hist(lgAB, type="o", plot=F)
> 12: else
> >
>
> Thanks again,
>
> ______________________________________________
> 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

-- 
Csardi Gabor <csardi@rmki.kfki.hu>    MTA RMKI, ELTE TTK

______________________________________________
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
Received on Wed Jun 14 06:03:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 14 Jun 2006 - 06:12:18 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.