I would like to use the following formula to round my whole data frame in R:
format(round(Df$`p-value`, digits=2), nsmall = 2)
Now, the code above is only for one column (just to show you).
I know dplyr is easy to use when I want to use the formula for my whole data frame as there is the across() function.
I tried the following:
Df %>%
mutate(across(format(round(digits=2), nsmall = 2)))
However, I get an error, saying that "argument "x" is missing, with no default". I assume I need to make a small adjustment to the code but I couldn't figure out what I need to adjust? Could someone help me here please?
Thank you.