[R] Calling stargazer() with do.call() in R 4.2.0

Arne Henningsen @rne@henn|ng@en @end|ng |rom gm@||@com
Fri May 27 17:29:21 CEST 2022


Dear all  (cc Marek = maintainer of the stargazer package)

We use do.call() to automatically create many LaTeX tables with
stargazer but after upgrading to R 4.2.0, this no longer works. I
illustrate this with a simple reproducible example:

R> data("USArrests")
R> res <- lm( Murder ~ UrbanPop, data = USArrests )
R> library(stargazer)
R> stargazer(res)  # works as expected
R> do.call( stargazer, list(res) )
Error in if (is.na(s)) { : the condition has length > 1

Any ideas what we can do so that the last command works with R 4.2.0?

/Arne

-- 
Arne Henningsen
http://www.arne-henningsen.name



More information about the R-help mailing list