I have a big data frame and I want to remove certain rows from it based on first char of a column being a letter or a number. Sample of my data frame looks like a below:
y<-c('34TA912','JENAR','TEST','34CC515')
z<-('23.12.2015','24.12.2015','24.12.2015','25.12.2015')
abc<-data.frame(y,z)
Based on the sample above. I would like to remove second and third rows due to the value in y column in second row and third row starting with a letter instead of a number. Characters written in Y column could be anything, so only way I could filter is checking the first character without using any predefined value. If I use grep with a character, since other rows also contain letter, I could remove them aswell. Can you assist?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…