[R] source() does not include added code
Doug Edmunds
dougedmunds at gmail.com
Wed Aug 31 17:39:56 CEST 2016
Thank you. That explains it (auto-printing is not done).
On 8/31/2016 8:35 AM, Joshua Ulrich wrote:
> I have quantstrat installed and it works fine for me. If you're
> asking why the output of t(tradeStats('macross')) isn't being printed,
> that's because of what's described in the first paragraph in the
> *Details* section of help("source"):
>
> Note that running code via ‘source’ differs in a few respects from
> entering it at the R command line. Since expressions are not
> executed at the top level, auto-printing is not done. So you will
> need to include explicit ‘print’ calls for things you want to be
> printed (and remember that this includes plotting by ‘lattice’,
> FAQ Q7.22).
>
> So you need:
>
> print(t(tradeStats('macross')))
>
> if you want the output printed to the console.
>
More information about the R-help
mailing list