% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/round_df.R
\name{round_df}
\alias{round_df}
\title{round_df}
\usage{
round_df(df, digits = 3)
}
\arguments{
\item{df}{a data frame}

\item{digits}{number of digits for the round function}
}
\value{
data frame with rounded values
}
\description{
Round all numeric columns in a data frame.
}
\examples{
ID <- c("a", "b", "c", "d", "e")
Value1 <- as.numeric(c("3.4", "6.4", "8.7", "1.1", "0.1"))
Value2 <- as.numeric(c("8.2", "1.7", "6.4", "1.9", "10.3"))
df <- data.frame(ID, Value1, Value2, stringsAsFactors = FALSE)
round_df(df, digits = 0)

}
\references{
https://stackoverflow.com/questions/9063889/how-to-round-a-data-frame-in-r-that-contains-some-character-variables
}
\keyword{internal}
