randy3k / radian

A 21 century R console
MIT License
1.96k stars 73 forks source link

Not printing output of intermediate expressions #388

Closed renkun-ken closed 1 year ago

renkun-ken commented 1 year ago

Suppose the following code

lm(mpg ~ cyl + vs, data = mtcars)
lm(mpg ~ cyl, data = mtcars)

With an older radian (can't remember which), the output is

>lm(mpg ~ cyl + vs, data = mtcars)
  lm(mpg ~ cyl, data = mtcars)

Call:
lm(formula = mpg ~ cyl + vs, data = mtcars)

Coefficients:
(Intercept)          cyl           vs  
    39.6250      -3.0907      -0.9391  

Call:
lm(formula = mpg ~ cyl, data = mtcars)

Coefficients:
(Intercept)          cyl  
     37.885       -2.876  

With the latest release, only the output of the last expression is shown:

> lm(mpg ~ cyl + vs, data = mtcars)
  lm(mpg ~ cyl, data = mtcars)

Call:
lm(formula = mpg ~ cyl, data = mtcars)

Coefficients:
(Intercept)          cyl  
     37.885       -2.876

Is it possible to restore the old behavior?

randy3k commented 1 year ago

It was a side effect of fixing https://github.com/randy3k/radian/issues/377. Let me see if I can do something on it.