Rounds all numeric columns in dataframe, using the R default "half to even"

round_df(df, digits = 2)

Source

https://stackoverflow.com/questions/9063889/how-to-round-a-data-frame-in-r-that-contains-some-character-variables

Arguments

df

Dataframe to be rounded

digits

Number of digits, defaults to 2