Skip to content
Prev 363672 / 398502 Next

source() does not include added code

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.
On Wed, Aug 31, 2016 at 10:26 AM, Doug Edmunds <dougedmunds at gmail.com> wrote: