[R] non-zero sequence of numbers

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Oct 11 19:54:35 CEST 2005


Jason Horn <jason at 109valentine.com> writes:

> Can anyone think of a way to create a pretty() sequence that excludes  
> zero?  Or a way to remove the zero from a sequence after using pretty()?

The former is rather hard because zero is generally considered just
about the prettiest number around...

As for the latter, something like s <- pretty(x); s <- s[s!=0]
or maybe s[zapsmall(s) != 0].

 
> Thanks,
> 
> - Jason
> 
> 
> Jason Horn
> Boston University Department of Biology
> 5 Cumington Street  Boston, MA 02215
> 
> jhorn at bu.edu
> office: 617 353 6987
> cell: 401 588 2766
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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
> 

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list