In: Computer Science
SOURCE CODE:
*Please follow the comments to better understand the code.
**Please look at the Screenshot below and use this code to copy-paste.
***The code in the below screenshot is neatly
indented for better understanding.
#Your all_number vector here.
all_numbers <- c(10:21, seq(21:30))
print(all_numbers)
# To get the 11th number, we use the subscript [11] as
follows.
eleventh <- all_numbers[11]
print(paste('Eleventh Number is ', eleventh))
#To get some numbers from 2 to 5 position, we do like this
some_numbers <- all_numbers[2:5]
print('2 to 5 position numbers are ')
print(some_numbers)
=================
SCREENSHOT: