notes on installing RStan/Rcpp on Windows

6 views
Skip to first unread message

Bob Carpenter

unread,
Sep 26, 2012, 1:39:21 PM9/26/12
to stan...@googlegroups.com
Summary:

A colleague at CCLS tried installing RStan,
hit a wall on the Rcpp side, then found a
helpful blog post on getting Rcpp working on
Windows. I added a link to the post in our getting
started guide Wiki under the Windows C++ install
bullet.

Some more specifics of where she had problems:

---------------------------------------------------------
>> my goal was to get stan installed by the time we meet, and i ran into
>> problems with the pre-conditions, i.e., getting R
>> to talk with C++ after I reinstalled R version 2.15.
>
> Could you help us out by telling me what specifically
> went wrong at what step? Did you see our instructions to
> RTools and was that straightforward to install?

It was straightforward in one sense, but it was all windows/cygwin/path
problems.

> Did you need to put R on a path without a space? The
> handling of Windows conventions is abysmal, both in
> R and Rcpp.

Yes, I needed to put R on a path without a space so I just used C:/R and
it helped to install Rtools under that as C:/R/Rtools. The page I
pointed you to, which is aptly titled "Installing Rcpp On Windows 7 For
R And C++ Integration", said that there are two problems: (1) the
non-space path issue; (2) a separate cygwin path warning issue

The solution includes use of a nice utility called Redmond Path that
makes it a lot easier to see your current path and modify it, because
it's a GUI. This is of course not necessary, but it allows you to
select a folder and add it to the path by right clicking, which is a lot
easier than typing it in.

>> however, i have now found an awesomely clear and helpful page for
>> re-installing R on windows. I don't know that you
>> would ever need to know this or point anyone to it, but in case it's
>> useful, the page is
>> http://tonybreyal.wordpress.com/2011/12/07/installing-rcpp-on-windows-7-for-r-and-c-integration/



>> When i followed these instructions, i was able to integrate r and c++
>
> Thanks. I added a pointer to that page on
> our install page.

Done.

> Hopefully that [installing RStan] will be easy.

yes, it was!
-------------------------------------------------------

- Bob



Jiqiang Guo

unread,
Sep 26, 2012, 2:20:47 PM9/26/12
to stan...@googlegroups.com
Mainly two issues here, 

First, add the path of Rtools to $PATH on windows, which can be done during its installation and is actually written 

Second, the space in Rcpp's installation path.  I asked on Rcpp mailing list to fix that, but Rcpp guys insist that users should install R in a path without space.  Then I spent quite sometime to make it work, I believe, that RStan is fine if Rcpp library is installed in a path with space.  But users can have problems with the 'hello word' example I gave in the RStan instruction to test if c++ is installed since that is purely Rcpp.  

--
Jiqiang 






--



Reply all
Reply to author
Forward
0 new messages