# load libraries for models and data
library(MASS)
# generate data
set.seed(2015)
x <- rnorm(100, 5, 2)
# fit models
fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1))
# summarize model fit with tidiers
tidy(fit)
glance(fit)
Run the code above in your browser using DataLab