Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # set up the plot
- myplot <- qplot(data=tnffinal, log_100m, log_1500m, color=Female)
- # add Least Squares fit lines (you can chose other methose like Loess)
- myplot_fit <- myplot+geom_smoot(method=lm)
- # output graph
- myplot_fit
- tnffinal = data.frame(
- log_100m = c(rnorm(10), rnorm(10,5)),
- log_1500m = c(rnorm(10), rnorm(10,5)),
- Female = factor(rep(0:1, each = 10))
- )
- library(ggplot2)
- myplot <- qplot(data=tnffinal, log_100m, log_1500m, color=Female)
- # add Least Squares fit lines (you can chose other methose like Loess)
- myplot_fit <- myplot+geom_smooth(aes(group = Female),method=lm,)
- # output graph
- myplot_fit
Add Comment
Please, Sign In to add comment