I have a bed-like dataframe in R and want to subset it by another bed-like file e.g.:
Bed file 1:
Chr Start End 1 1 10
Chr Start End 1 5 13
Final bed file:
Chr Start End 1 5 10
So the final bed file should only consist of regions, which are present in both files.
Any suggestions how to do this in R?