extracting columns from 2 datasets

I do not know enough about what you are trying to do to say yes or no.

We need more information about what you are doing and what your code looks like to try and ansver such a question.

You might find this FAQ useful. We have some idea of the structure of your data but no idea in substantive or R coding of what you are trying to accomplish.