[R] source() does not include added code

Doug Edmunds dougedmunds at gmail.com
Wed Aug 31 17:05:39 CEST 2016


I am trying to understand why "source" does not process
all the code in this R file.

1. I copied maCross.R from the quantstrat/demo directory
into my project area.

QuantStrat is available at
   https://r-forge.r-project.org/R/?group_id=316
install.packages("quantstrat", repos="http://R-Forge.R-project.org")

2. I added this line at the end of the R file:

     t(tradeStats("macross")

3. When I enter:
      source('maCross.R')

at the prompt, it fails to process the added line of code.

Why not?

--DAE



More information about the R-help mailing list