Installing rstanarm

659 views
Skip to first unread message

Peter Li

unread,
Sep 12, 2013, 2:09:28 AM9/12/13
to stan...@googlegroups.com
How do I install rstanarm? I tried using the r package dev tools but when I run install_github("rstanarm") I get client error (406) not acceptable.


Peter

Ben Goodrich

unread,
Jul 25, 2013, 11:22:39 AM7/25/13
to stan...@googlegroups.com
I haven't figured it out yet. I would just download either


and then follow the procedure to install a package from a local file.

Ben

Peter Li

unread,
Jul 25, 2013, 11:43:40 AM7/25/13
to stan...@googlegroups.com, Li.Pe...@gmail.com
I'm using the r package installer and getting this error:

2: In install.packages(file.choose(), "/Users/Peter/rstanarm", NULL,  :
  installation of package ‘/Users/Peter/rstanarm/rstanarm.tar.gz’ had non-zero exit status


Peter
--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ben Goodrich

unread,
Jul 25, 2013, 12:31:10 PM7/25/13
to stan...@googlegroups.com, Li.Pe...@gmail.com
On Thursday, July 25, 2013 11:43:40 AM UTC-4, Peter Li wrote:
I'm using the r package installer and getting this error:

2: In install.packages(file.choose(), "/Users/Peter/rstanarm", NULL,  :
  installation of package ‘/Users/Peter/rstanarm/rstanarm.tar.gz’ had non-zero exit status

What does the output say when you do it from a shell? Mine is working:

goodrich@CYBERPOWERPC:/tmp$ R CMD INSTALL rstanarm.tar.gz
Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing to library ‘/
opt/site-library’                                                                                                                            
* installing *source* package ‘rstanarm’ ...                                                                                                                          
** R                                                                                                                                                                  
** exec                                                                                                                                                                
** preparing package for lazy loading

TRANSLATING MODEL
'Gaussian GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C
++ CODE FOR MODEL 'Gaussian GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler
; sampling not done

TRANSLATING MODEL
'Discrete GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C
++ CODE FOR MODEL 'Discrete GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler
; sampling not done
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (rstanarm)
goodrich@CYBERPOWERPC
:/tmp$ echo $?
0


Ben

Peter Li

unread,
Jul 25, 2013, 1:04:07 PM7/25/13
to Ben Goodrich, stan...@googlegroups.com, Li.Pe...@gmail.com
I get this error:
Error in untar2(tarfile, files, list, exdir) : unsupported entry type ‘g’

Ben Goodrich

unread,
Jul 25, 2013, 1:07:39 PM7/25/13
to stan...@googlegroups.com, Li.Pe...@gmail.com
On Thursday, July 25, 2013 1:04:07 PM UTC-4, Peter Li wrote:
I get this error:
Error in untar2(tarfile, files, list, exdir) : unsupported entry type ‘g’

I have no idea about that. Do you have some ancient version of tar or gzip installed?

I suppose you could try

git clone https://github.com/stan-dev/rstanarm.git
R CMD INSTALL rstanarm
/

Ben

Peter Li

unread,
Jul 25, 2013, 1:09:13 PM7/25/13
to Ben Goodrich, stan...@googlegroups.com, Li.Pe...@gmail.com
I'm not sure what version of tar I have but that seemed to have worked. Thanks. I'll let you know which models (if any) can't be run with rstanarm.


Peter

Peter Li

unread,
Jul 25, 2013, 1:12:55 PM7/25/13
to Peter Li, Ben Goodrich, stan...@googlegroups.com
Just kidding.. Now it says there's something missing.

Cloning into 'rstanarm'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 24 (delta 3), reused 18 (delta 3)
Unpacking objects: 100% (24/24), done.
Chinese-Secret-Service-Van-4:~ Peter$ R CMD INSTALL rstanarm/
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’

* installing *source* package ‘rstanarm’ ...
** R
** exec
** preparing package for lazy loading
Warning: package ‘Rcpp’ was built under R version 2.15.3


TRANSLATING MODEL 'Gaussian GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C++ CODE FOR MODEL 'Gaussian GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler; sampling not done

TRANSLATING MODEL 'Discrete GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C++ CODE FOR MODEL 'Discrete GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler; sampling not done
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : package ‘rstan’ is not installed for 'arch=i386'
Error: loading failed
Execution halted
*** arch - x86_64
Warning: package ‘Rcpp’ was built under R version 2.15.3
ERROR: loading failed for ‘i386’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rstanarm’

Ben Goodrich

unread,
Jul 25, 2013, 1:13:45 PM7/25/13
to stan...@googlegroups.com, Li.Pe...@gmail.com
On Thursday, July 25, 2013 1:09:13 PM UTC-4, Peter Li wrote:
I'm not sure what version of tar I have but that seemed to have worked. Thanks. I'll let you know which models (if any) can't be run with rstanarm.

We already know that anything multilevel won't work yet because we don't have a stanlmer() function yet. Basically, we just have stanglm() so far, although I guess that is sufficient to do a lot. I made a wiki page

https://github.com/stan-dev/rstanarm/wiki/Models-from-ARM-Book

that I think you can edit.

Ben


Ben Goodrich

unread,
Jul 25, 2013, 1:16:11 PM7/25/13
to Peter Li, stan...@googlegroups.com

Peter Li

unread,
Jul 25, 2013, 1:20:06 PM7/25/13
to Ben Goodrich, Peter Li, stan...@googlegroups.com
I have rstan installed. Do I need to have the version in the develop repo?

As for the wiki, I also made one on the stan page to list all of the model code that we have (https://github.com/stan-dev/stan/wiki/ARM-Models). I'll be sure to link the two.


Peter


On 7/25/13 1:16 PM, Ben Goodrich wrote:
On Thu, Jul 25, 2013 at 1:12 PM, Peter Li <li.pe...@gmail.com> wrote:
Just kidding.. Now it says there's something missing.

Cloning into 'rstanarm'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 24 (delta 3), reused 18 (delta 3)
Unpacking objects: 100% (24/24), done.
Chinese-Secret-Service-Van-4:~ Peter$ R CMD INSTALL rstanarm/
* installing to library �/Library/Frameworks/R.framework/Versions/2.15/Resources/library�

* installing *source* package �rstanarm� ...

** R
** exec
** preparing package for lazy loading
Warning: package �Rcpp� was built under R version 2.15.3


TRANSLATING MODEL 'Gaussian GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C++ CODE FOR MODEL 'Gaussian GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler; sampling not done

TRANSLATING MODEL 'Discrete GLM' FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C++ CODE FOR MODEL 'Discrete GLM' NOW.
Error : variable does not exist; processing stage=data initialization; variable name=N; base type=int
failed to create the sampler; sampling not done
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : package �rstan� is not installed for 'arch=i386'

Error: loading failed
Execution halted
*** arch - x86_64
Warning: package �Rcpp� was built under R version 2.15.3
ERROR: loading failed for �i386�
* removing �/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rstanarm�


On 7/25/13 1:09 PM, Peter Li wrote:
I'm not sure what version of tar I have but that seemed to have worked. Thanks. I'll let you know which models (if any) can't be run with rstanarm.


Peter

On 7/25/13 1:07 PM, Ben Goodrich wrote:
On Thursday, July 25, 2013 1:04:07 PM UTC-4, Peter Li wrote:
I get this error:
Error in untar2(tarfile, files, list, exdir) : unsupported entry type �g�

Ben Goodrich

unread,
Jul 25, 2013, 1:27:39 PM7/25/13
to stan...@googlegroups.com, Ben Goodrich, Peter Li
On Thursday, July 25, 2013 1:20:06 PM UTC-4, Peter Li wrote:
I have rstan installed. Do I need to have the version in the develop repo?

No, actually I think it should only work if you have rstan 1.3 installed, which R complained about


** testing if installed package can be loaded
*** arch - i386
Error : package �rstan� is not installed for 'arch=i386'
Error: loading failed
Execution halted
*** arch - x86_64
Warning: package �Rcpp� was built under R version 2.15.3
ERROR: loading failed for �i386�
 
Do you maybe need to do

export R_ARCH='/x86_64'

or something.

 
As for the wiki, I also made one on the stan page to list all of the model code that we have (https://github.com/stan-dev/stan/wiki/ARM-Models). I'll be sure to link the two.

OK, or just note on your wikipage whether it is also working from rstanarm.

Ben


Peter Li

unread,
Jul 25, 2013, 1:31:52 PM7/25/13
to Ben Goodrich, stan...@googlegroups.com, Peter Li
Same error still. I'll try reinstalling RStan.

Peter Li

unread,
Jul 25, 2013, 2:25:05 PM7/25/13
to Peter Li, Ben Goodrich, stan...@googlegroups.com
Ok, so I got the same error using command line. As a side note, I figured out how to get the install to run (but not work--same error still) with the r package devtools:

library(devtools)
install_github("rstanarm","stan-dev")

Jiqiang Guo

unread,
Jul 25, 2013, 2:34:44 PM7/25/13
to stan...@googlegroups.com
The error might be still due to that rstan is installed for only one bitness, 64 or 32.  If it is, one way is to install rstan for both 64 and 32 bits by using 

install.packages('rstan', type = 'source', INSTALL_opts = "--merge-multiarch")

The other way is to update your R.  R 3.0.1 on mac only has 64 bits now. 

--
Jiqiang

Peter Li

unread,
Jul 25, 2013, 3:09:32 PM7/25/13
to stan...@googlegroups.com, Li.Pe...@gmail.com
That did the trick, though it took quite a while to install (~20+ min).

Peter
Reply all
Reply to author
Forward
0 new messages