I have a table like below, it is a bed file of genome coordinate, I would like to keep only rows with numbers.

Input:

    1	        141009669	141009952
    9	        141016322	141016973
    GL000195.1	81719	82468
    GL000195.1	142613	142923
    GL000220.1	119445	119746
    HG115_PATCH 101957832	101958132
    HG1308_PATCH 130205069	130205369
    HG1308_PATCH 130205406	130205773
    HG748_PATCH  77577953	77578264
    X	         200983	202660
    y         205180	205702


output:

    1	        141009669	141009952
    9	        141016322	141016973
    X	         200983	202660
    y	         205180	205702


Thanks in advance!
A straight forward way:   

     mainChr = c(as.character(1:22),'x','X','y','Y')
     data = read.delim('your.bed',stringsAsFactor = F,header = F)
     data_with_mainChr = data[data$V1 %in% mainChr,]

if you want to use `readr` and `dplyr` which is more efficient when dealing with big files:

    mainChr = c(as.character(1:22),'x','X','y','Y')
    library(dplyr); library(readr)
    data = read_tsv('your_bed_file',col_names = F)
    data_with_mainChr = dplyr::filter(data, X1 %in% mainChr)

