# The colon operator is used to display the range or sequence between two given numbers

# Simple range >>

print(0:9)

print(3:-4)

# Store a range in variable Num_range >>

Num_range = 10

20^1)

print(Num_range)

# Find the mean and median

mean(Num_range)

median(Num_range)

#

# -------------------------------------------------------------------

# %in% compares a value or range with another given value or range

# Simple example >>

4 %in% 3:8

4:-4 %in% 0

median(1:7) %in% c(0,1,1,2,3,5,8,13)

# Compare characters

"X3" %in% c("X1","X3","X5","XS")

NULL %in% c("a","b","c",NULL) # why this strange output?

# Return index

# Compare set of values with a range

c(15,20,45) %in% Num_range