Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Rsource fails after first line


From   Richard Herron <[email protected]>
To   [email protected]
Subject   st: Rsource fails after first line
Date   Wed, 9 Nov 2011 18:24:24 -0500

I am using -rsource- from SSC by Roger Newsom, but it fails after the
first line of actual R code (i.e., the comments source, but it returns
to Stata after the first R command).

Here is the relevant code:

global working_dir C:\users\richard\documents\research\term_paper_econ824
global Rterm_path `"C:\Program Files\R\R-2.13.1\bin\x64\Rterm.exe"'
rsource using `"$working_dir\get_data.R"'

And the output, which doesn't provide an error, just returns to Stata:

. rsource using `"$working_dir\get_data.R"'
Assumed R program path: "C:\Program Files\R\R-2.13.1\bin\x64\Rterm.exe"

Beginning of R output from source file:
C:\users\richard\documents\research\term_paper_econ824\get_data.R

R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> # get ETF data from yahoo finance
>
> # housekeeping
> library("quantmod")

End of R output from source file:
C:\users\richard\documents\research\term_paper_econ824\get_data.R

I am using Stata 11.2 and R 2.13-1 on a Windows 7 laptop. Any ideas? Thanks!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index