Closed romainfrancois closed 1 year ago
First take on this. This evaluates each expression, and print them, respecting their visibility, i.e. cat("hello") would return NULL invisibly and (cat("hello")) would return NULL visibly:
cat("hello")
NULL
(cat("hello"))
internally this uses Rf_PrintValue() see here for details https://github.com/r-devel/r-svn/blob/cacdcc725217a01330d1d92c65f8a4b77bef5015/src/main/print.c#L27
Rf_PrintValue()
so we get the same thing as if it would have been auto printed in the console:
except that there is an extra \n between "hello" and "bonjour".
\n
Eventually the idea is to do something else than print()ing, if possible in a way that can be extended by third party 📦 .
print()
First take on this. This evaluates each expression, and print them, respecting their visibility, i.e.
cat("hello")
would returnNULL
invisibly and(cat("hello"))
would returnNULL
visibly:internally this uses
Rf_PrintValue()
see here for details https://github.com/r-devel/r-svn/blob/cacdcc725217a01330d1d92c65f8a4b77bef5015/src/main/print.c#L27so we get the same thing as if it would have been auto printed in the console:
except that there is an extra
\n
between "hello" and "bonjour".Eventually the idea is to do something else than
print()
ing, if possible in a way that can be extended by third party 📦 .