lrberge / fixest

Fixed-effects estimations
https://lrberge.github.io/fixest/
361 stars 59 forks source link

fixest 0.12.0: Summary function not working #492

Closed greenguy33 closed 2 months ago

greenguy33 commented 2 months ago

I'm using R version 4.12 on ubuntu 22.04

After estimating my model, I try to call the summary function, but I see the error:

Error: in string_magic_internal(..., .delim = .delim, .envi...: 
`string_magic` requires at least one character scalar to work.
Named arguments are only used as variables on which to apply
interpolation.
FIX: please provide at least one non-named argument.

My code:

library(fixest)
data <- read.csv("mydata.csv")
f <- as.formula("y ~ x + x_sq + x2 + x2_sq | fe1 + fe2")
out <- feols(data, f)
summary(out)

This error seems to occur regardless of the permutations of arguments that I use. For example, I get the same thing if I run:

summary(out, se = "standard")

or any other combinations of the arguments shown here

Can't find much by googling this but it seems to be some error buried somewhere in the code where string magic is being called incorrectly. Any ideas? Maybe a version incompatibility issue?

Thanks!

EDIT: My versions for fixest and string magic packages.

> packageVersion("stringmagic")
[1] ‘1.1.1’
> packageVersion("fixest")
[1] ‘0.12.0’
lrberge commented 2 months ago

Thanks for reporting! There's an ugly bug out there that I introduced but can't get to replicate.

Could you rerun by adding setDreamerr_show_stack(TRUE) before and paste the full error with the context (the few lines before)? Thanks!

greenguy33 commented 2 months ago

Hi @lrberge, sure. I did as you asked and the following error appeared (nothing more than the line pasted below): Error: C stack usage 7974852 is too close to the limit Is that informative?

lrberge commented 2 months ago

Not really, it's another bug :-D

Trying to fix it.

greenguy33 commented 2 months ago

Got it, thanks! I'll look out for any updates. In the meantime I can probably work around this issue, so take your time.

lrberge commented 2 months ago

FYI the problem is solved in #494 It was due to a peculiarity introduced in R v4.1.0 and removed in v4.1.3. You only need to update to stringmagic v1.1.2 and it should work. Thanks for reporting!

greenguy33 commented 1 month ago

@lrberge Thank you for your prompt attention to this issue! Much appreciated.