Skip to content

Instantly share code, notes, and snippets.

@t-student
Created November 6, 2015 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-student/abe13139e177f24eaf0d to your computer and use it in GitHub Desktop.
Save t-student/abe13139e177f24eaf0d to your computer and use it in GitHub Desktop.
knee.mean <- mean(df2$kneeheel, na.rm = T)
knee.sd <- sd(df2$kneeheel, na.rm = T)
p <- ggplot(data = df2, aes(x=kneeheel))
p <- p + geom_density(aes(y=..density..))
p <- p + stat_function(fun = dnorm, args = list(mean = knee.mean, sd = knee.sd), colour = "red")
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment