I am constructing a program where I need a to construct a vector of values. These values are constructed from other vectors. A particular vector M has thousands of values, but I need to delete/create a vector that contains all those values below 10. It should be noted that there is values missing (NA) with in M. I have tried everything I can think of.
Examples of codes I have tried:
-
if (M<10,D==M) , where D is an empty vector
-
if (M<10 || M%in%NA) {D==M}
I have tried others, such as the use of list.append. I am absolutely stuck.