Skip to content
Back to formatted view

Raw Message

Message-ID: <8241e2c4-6627-f3d9-2a65-e68577ab7842@gmail.com>
Date: 2016-08-31T15:39:56Z
From: Doug Edmunds
Subject: source() does not include added code
In-Reply-To: <CAPPM_gSzW37A9xQn1qrTEqd6jWx-mE-cOq2i7zEqU08THqJn7A@mail.gmail.com>

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.
>