Created
November 6, 2017 16:19
-
-
Save chris-prener/eff7358f57c492ce2ea58c67470de9fa to your computer and use it in GitHub Desktop.
SOC 4930 & SOC 5050 - Week 11 - Producing Correlation Output in R
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
library(ggplot2) | |
library(stargazer) | |
# load data | |
autoData <- mpg | |
# create correlation table | |
# requires that the corrTable function is available in your global environment | |
output <- corrTable(autoData, coef = "pearson", listwise = TRUE, round = 3, pStar = TRUE, cyl, cty, hwy) | |
# convert output to LaTeX | |
stargazer(output, title = "Example Correlation Table", summary = FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment