Is it possible to define a constant function (for example the zero function) in R?
I found the following unsatisfying hack to create the "seven function": constant <- stepfun( x = -100:100, y = rep(7, 201) ) This is mathematically unsatisfying because the domain is artificially restricted to [-100,100] rather than (-Inf,Inf). Additionally, unless I use pch="n" there are ugly dots on the plot (and again this feels hackish). Any suggestions on what else to do? Thanks in advance. ______________________________________________ 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.