1. Engineering
  2. Computer Science
  3. exercise 7 if x...

Question: exercise 7 if x...

Question details

Exercise 7 If x <- c(2, 4, 6, 8) and y <c(TRUE, TRUE, FALSE, TRUE) What is the value of: sum(x[y]) a. 20 b. 8 c. 14 d. NA Exercise 8 Consider the vector: x <- c(34, 56, 55, 87, NA, 4, 77, NA, 21, NA, 39) Which R-statement will count the number of NA values in a. count(is.na(X)) b. length(is.na(x)) c. sum is.na(x)) d. count(!is.na(x)) e. sum(lis.na(x))
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution