Applying round off function on all sheets in a run in R -


thanks community, using following code round off numeric values in given data frame. take step further , automate function identifies imported dataframe ( not ones created in workflow) , round off numeric values in it. have run function every time import dataframe. round of function using

round_df <- function(df, digits) {     nums <- vapply(df, is.numeric, fun.value = logical(1))      df[, nums] <- round(df[, nums], digits = digits)      (df) } df <- round_df(df, digits = 2) 

is there way identify imported dataframe in environment? should use loop?

thank much.


Comments

Popular posts from this blog

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -