step function - RDocumentation