Create a data sequence from 1 to 30 only with odd numbers. Use the seq() function

Asked

Viewed 883 times

0

I am trying to solve this question given in a manual but I cannot make the sequence of odd numbers

  • Post the code you’ve tried so it’s easier for the community to help you

  • thanks but I already got the bid was to start from 1 and increase by 2

1 answer

2

Just pay attention to the parameters.

seq(from = 1, to = 30, by = 2)
  • from: beginning of the sequence
  • to: maximum possible value of the sequence. Not quite the final element.
  • by: sequence increment.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.