Skip to content

Available in S-plus, also in R1.8.1?

2 messages · Hoeven, Maarten van der, Uwe Ligges

#
Hi,

I've send this one to the list last Thursday, no reaction yet. It's
about the Connect Type in S+.

===

Hello all,

I'm looking for the R-equivalent of the S-option "Connect type: half
horiz first". Link:
http://miner.stern.nyu.edu/Splus/help/guihelp/__hhelp/connect_type.htm

I'm plotting with type="s" or type="S"; this is giving me a stairstep
starting, or ending with the value on the x-axis (as documented). But, I
want the x-value in the middle of the step, like "half horiz first" in
S-plus does.

Is this possible in R?


Thanks,
Maarten
--------------------------------------------------------------
Zie ook/see also: http://www.knmi.nl/maildisclaimer.html
#
Hoeven, Maarten van der wrote:

            
In order to get an answer, you might want to be more specific what
"Connect type: half horiz first" really does in S-PLUS. I don't think 
something like that is available within an existing R function (I might 
be wrong here), but it can easily be coded (e.g. along the lines of code 
in package "stepfun"), given there is an *explicit definition* (and the 
cited URL is not very helpful here).
My question is: How do you define the "middle of a step", in particular 
if the interesting x values of your step-function are not equidistant?

And another question: Why do you want to create a plot that needs to be 
explained? Other plots are much more intuitive (at least for me).

Uwe Ligges