I have two data.frame objects 'x' and 'ans1', there are 500 columns in 'x' and 7 in 'ans1' How can I find names of columns from 'x', which are equal to columns from 'ans1'?
With %in%:names(x) %in% names(ans1)See ?match for more detail.
With %in%:
ReplyDeletenames(x) %in% names(ans1)
See ?match for more detail.