HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

Unable to remove comments/message from stargazer in front of table #72

Open mr-r0b0t opened 8 years ago

mr-r0b0t commented 8 years ago

Hi everyone,

We haven't been able to figure out how to remove the following comments/messages in front of our tables in the pdf output. In particular, the following screenshot shows the respective text:

screen shot 2015-11-13 at 10 54 38 pm

This is the relevant code chunk in our Markdown-File to reproduce the issue:

library("nnet")
library("memisc")
library("stargazer")

Dataset_1_Multinom <- read.csv("https://raw.githubusercontent.com/KatrinHeger/CollaborativeResearchProject/master/Assignment3_Data-Analysis/Dataset_1_Multinom.csv")

dat.1 <- Dataset_1_Multinom[is.na(Dataset_1_Multinom$conflict_outcome) == FALSE & is.na(Dataset_1_Multinom$rebel.support_d) == FALSE, c("conflict_outcome", "rebel.support_d")]
m1 <- multinom(conflict_outcome ~ rebel.support_d, data = dat.1)

dat.2 <- Dataset_1_Multinom[is.na(Dataset_1_Multinom$conflict_outcome) == FALSE & is.na(Dataset_1_Multinom$rebel.support_d) == FALSE & is.na(Dataset_1_Multinom$gov.support_d) == FALSE, ]
m2 <- multinom(conflict_outcome ~ rebel.support_d + gov.support_d, data = dat.2)

dat.3 <- Dataset_1_Multinom[is.na(Dataset_1_Multinom$conflict_outcome) == FALSE & is.na(Dataset_1_Multinom$rebel.support_d) == FALSE & is.na(Dataset_1_Multinom$gov.support_d) == FALSE & is.na(Dataset_1_Multinom$rtypesup_cat) == FALSE, ]
m3 <- multinom(conflict_outcome ~ rebel.support_d + gov.support_d + rtypesup_cat, data = dat.3)

dat.4 <- Dataset_1_Multinom[is.na(Dataset_1_Multinom$conflict_outcome) == FALSE & is.na(Dataset_1_Multinom$rebel.support_d) == FALSE & is.na(Dataset_1_Multinom$gov.support_d) == FALSE & is.na(Dataset_1_Multinom$rtypesup_cat) == FALSE & is.na(Dataset_1_Multinom$gtypesup_cat) == FALSE, ]
m4 <- multinom(conflict_outcome ~ rebel.support_d + gov.support_d + rtypesup_cat + gtypesup_cat, data = dat.4)

dat.5 <- Dataset_1_Multinom[is.na(Dataset_1_Multinom$conflict_outcome) == FALSE & is.na(Dataset_1_Multinom$rebel.support_d) == FALSE & is.na(Dataset_1_Multinom$gov.support_d) == FALSE & is.na(Dataset_1_Multinom$rtypesup_cat) == FALSE & is.na(Dataset_1_Multinom$gtypesup_cat) == FALSE & is.na(Dataset_1_Multinom$fightcaphigh) == FALSE & is.na(Dataset_1_Multinom$lngdp) == FALSE & is.na(Dataset_1_Multinom$lnyears) == FALSE & is.na(Dataset_1_Multinom$postCW) == FALSE, ]
m5 <- multinom(conflict_outcome ~ rebel.support_d + gov.support_d + rtypesup_cat + gtypesup_cat + fightcaphigh + lngdp + lnyears + postCW, data = dat.5)

stargazer::stargazer(m1, m2, digits = 2)

Maybe someone will still be able to give us a hint with respect to the late time.

Thank's a lot!

Best,

Benedikt

christophergandrud commented 8 years ago

Add header = FALSE to your stargazer call, e.g. https://cdn.rawgit.com/HertieDataScience/SyllabusAndLectures/b9f58b3e4dfde2543fb490f46349ce7afec4c18b/LectureSlides/Lecture9/Lecture9.html#25