how-to-extract-specific-type-columns-from-data-frame-in-r