Sto riscontrando un problema in cui la funzione Stargazer sta interpretando i dati nel mio data.frame come un comando in lattice. Mi piacerebbe trovare un modo per sopprimere questa funzionalità di Stargazer. Vedi sotto.L'interpretazione da stargazer dei dati data.frame come codice in lattice costituisce un bug o è previsto?
z <- c("Bank of America Corp",
"Citigroup Inc",
"JPMorgan Chase & Co",
"Morgan Stanley",
"Wells Fargo & Co")
s <- data.frame(z=z, l= c(100000, 25, 10000, 24, 100000))
library(stargazer)
stargazer(s, type = "text", summary = FALSE)
# prints out
==============================
z l
------------------------------
1 Bank of America Corp 100,000
2 Citigroup Inc 25
3 JPMorgan Chase Co
4 Morgan Stanley 24
5 Wells Fargo Co
------------------------------
Qui la e commerciale sta provocando una nuova colonna a causa del suo significato in lattice. Ho confermato questo perché sostituire & con e causa la tabella per stampare correttamente.
z <- c("Bank of America Corp",
"Citigroup Inc",
"JPMorgan Chase and Co",
"Morgan Stanley",
"Wells Fargo and Co")
s <- data.frame(z=z, l= c(100000, 25, 10000, 24, 100000))
library(stargazer)
stargazer(s, type = "text", summary = FALSE)
# prints out
===============================
z l
-------------------------------
1 Bank of America Corp 100,000
2 Citigroup Inc 25
3 JPMorgan Chase and Co 10,000
4 Morgan Stanley 24
5 Wells Fargo and Co 100,000
-------------------------------
C'è qualche opzione che posso invocare nella funzione Stargazer per prevenire questo comportamento?
quale versione di latex e stargazer stai usando? – Tarek