I'm new to R, but i'm trying to filter out rows of a dataset based on column values. The dataset hg19
is in BED
format with column headers, and I just want rows in which the values of columns 7 and 8 are equal, while still keeping the column header. This is what i've tried so far, but it I just get a bunch of rows with zero columns, and no column headers:
non_coding= subset(hg19, hg19[8] == hg[7])