What does R code nv <- v[v < 1000] do?

What does R code nv <- v[v < 1000] do?
A . Selects the values in vector v that are less than 1000 and assigns them to the vector nv
B . Sets nv to TRUE or FALSE depending on whether all elements of vector v are less than 1000
C . Removes elements of vector v less than 1000 and assigns the elements >= 1000 to nv
D . Selects values of vector v less than 1000, modifies v, and makes a copy to nv

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments