I am trying to create a logical vector in R, which will indicate for every value of a complete vector, if it is numeric or not.
I am trying to use the function is.numeric but it will only check if all the vector is numeric or not like that:
vec<-c(1,2,3,"lol")
t<-is.numeric(c[])
t
will produce FALSE
i looked here, but it will only tell how to check the entire vector and get a single value
i looked here, but the issue is not finite vs infinite
i am trying to take a data set, with some values being numbers and other being a string that implies that there is no value, and find a minimum only in the numeric values. for that i try to create a logical vector that will say for every entry of the vector if it is numeric or not. this is important for me to create that vector and i am trying to avoid a complete loop and construction of that vector if possible.