> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of William Dunlap > Sent: Wednesday, December 14, 2011 4:19 PM > To: Trying To learn again; r-help@r-project.org > Subject: Re: [R] Omit Inf > > > range(a, finite=TRUE)[2] # [1] for the min > [1] 2 > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > -----Original Message----- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Trying To learn > > again > > Sent: Wednesday, December 14, 2011 3:55 PM > > To: r-help@r-project.org > > Subject: [R] Omit Inf > > > > Hi all > > > > > a<-c(2,Inf) > > > max(a) > > [1] Inf > > > > > > > How can I say...omit Inf? > > > > I cannot find anything... > >
You could use something like max(a[is.finite(a)]) Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ______________________________________________ R-help@r-project.org 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.