# create a vector:
x <- c(12,7,3,4.2,18,2,54,-21,8,-5)

# find the mean:
result.mean <- mean(x)
print(result.mean)

# create a vector:
x <- c(12,7,3,4.2,18,2,54,-21,8,-5,NA)

# find the mean:
result.mean <-  mean(x)
print(result.mean)

# drop NA values and find the mean:
result.mean <- mean(x,na.rm = TRUE)
print(result.mean)

# create a vector:
x <- c(12,7,3,4.2,18,2,54,-21,8,-5)

# find the mean:
result.mean <- mean(x,trim = 0.3)
print(result.mean)

# create a vector:
x <- c(12,7,3,4.2,18,2,54,-21,8,-5)

# find the mean:
median.result <- median(x)
print(median.result)

