install.packages("relaimpo")
library(relaimpo)

#fit linear model:
Ozone_model <- lm(ozone_reading ~ . , data = Ozone)

#Get relative importance:
Relative_importance <- calc.relimp(lmMod, type = "lmg", rela = TRUE)

# Relative importance scaled to 100 and plot:
plot_RI <- as.data.frame(sort(relImportance$lmg, decreasing=TRUE))
colnames(plot_RI)[1] = 'value'
plot_RI$ID <- seq.int(nrow(plot_RI))
ggplot(plot_RI, aes(ID, value)) + 
  geom_point(col = 'blue') +
  geom_text(label = rownames(plot_RI), nudge_y = 0.042) +
  ylim(c(0,0.3)) +
  coord_flip() +
  theme_minimal()