I have a dataset in which a particular column (x in this case) has certain rows with character values.
How can I slice/subset these rows which contain any character value for data exploration purposes?
Please note that I don't want to hardcode all characters in rows to tell the code if the rows have these characters then subset these rows. Because my original dataset is huge, so this column could have any character values in any number of rows.
So, that is the purpose to see all those rows in that column that have a character value
Sample data and code:
library(dplyr)
x = c("1000", "1001", "1003", "14484R", "1004", "1005", "12241alternet", "12634TAB", "12644R", "END", NA, NA)
y = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
df = data.frame(x, y)
# subset/slice rows in column x that contain any character value