Function to read multiple columns automatically

Hi guys,

I have 6 columns ( 3 columns with text data, 3 more columns with numeric data ) in a data frame I need to read 3 columns (which is numeric) for now and when extra column added (numeric data) to the file dynamically my code has to read that column

How can I do that ?

Hi,

I do not understand what it is you are trying to do exactly. If you have the 6 columns already in a data frame, what do you mean by dynamically reading the data?

Please provide a reprex of your issue. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

Good luck,
PJ

load your data.frame with all its columns both char and numeric
use dplyr to select only the numeric ones

library(dplyr)
select(iris,
       where(is.numeric))