I currently have a data.frame (X) with the following structure:
Number Observation
1 34
2 Example
3 Example34%
4 Example
5 34
My desired output is 2 data frames, one which contains only the double observations (i.e 34) and one which contains everything else (Characters and Characters with numbers and %).
I have been able to obtain the number observations using:
y <- x[str_detect(x$Observation,("([0-9])")),]
But it also includes observation with characters and numbers. When I negate it !str_detect(...) i only get a character output leaving out Example34%. Is there a way to str_detect only number values and then !that to obtain everything else?
