Created
February 2, 2018 03:12
-
-
Save pratos/dc35d3fab61ee1ecb4c209b35bb07cb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(GGally) | |
lm.plt <- function(data, mapping, ...){ | |
plt <- ggplot(data = data, mapping = mapping) + | |
geom_point(shape = 20, alpha = 0.7, color = 'darkseagreen') + | |
geom_smooth(method=loess, fill="red", color="red") + | |
geom_smooth(method=lm, fill="blue", color="blue") + | |
theme_minimal() | |
return(plt) | |
} | |
ggpairs(corr.df, corr.idx[1:6], lower = list(continuous = lm.plt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment