In: Statistics and Probability
Perform the following tasks on R Studio/R
Construct a function called conv3 which inputs a measurement in
centimeters and outputs the corresponding measurement in inches.
However, if a negative value is entered as an input, no conversion
of unit is done and an error message is printed instead.
The R is as follows :
conv3 <- function(x){if (x>=0) {
x/2.54
} else {
"no conversion of unit is done "
}}