[R] customize the step value

Erich Subscriptions
Fri, 29 Oct 2021 07:17:14 -0000

seq(1.5,3.5,0.5)

The docs for seq will show you many more options.

> On 29.10.2021, at 09:06, Catherine Walt <walt at purpleemail.com>
wrote:
>
> dear members,
>
> Sorry I am newbie on R.
> as we saw below:
>
>> 1.5:3.5
> [1] 1.5 2.5 3.5
>
> How can I make the step to 0.5?
> I want the result:
>
> 1.5 2.0 2.5 3.0 3.5
>
> Thanks.
> Cathy
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.