# Rstan on Windows

**URL:** <https://discourse.mc-stan.org/t/rstan-on-windows/16673>\
**Category:** RStan\
**Created:** [July 16, 2020, 4:50pm UTC](https://discourse.mc-stan.org/t/rstan-on-windows/16673 "2020-07-16T16:50:51Z")\
**Posts on this page:** 1\
**Showing post:** 70

<div class="post-metadata">

**Author:** ![lucialenasophie](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/lucialenasophie/32/8914_2.png) [@lucialenasophie](https://discourse.mc-stan.org/u/lucialenasophie)\
**Post date:** [July 30, 2020, 2:56pm UTC](https://discourse.mc-stan.org/t/rstan-on-windows/16673/70 "2020-07-30T14:56:29Z")

</div>

Thanks for your comment, @mcol, it directed me to parts of the problem.

Forcing RcppParallel to install v5.0.1. by `install.packages("RcppParallel", version = "5.0.1.")` gave the following warning

```
Created ../build/lib_release directory
../../build/Makefile.tbb:32: CONFIG: cfg=release arch=ia32 compiler=gcc target=windows runtime=mingw
sh: C:/Rtools/mingw_32/bin/g++: No such file or directory
make[2]: *** [../../build/common_rules.inc:119: concurrent_hash_map.o] Error 127
make[1]: *** [Makefile:104: tbb_release] Error 2
cp: cannot stat 'tbb/build/lib_release/tbb*.dll': No such file or directory
make: *** [Makevars:89: tbb] Error 1
ERROR: compilation failed for package 'RcppParallel'
* removing 'C:/Users/Lucia/R-3.5.1/library/RcppParallel'
* restoring previous 'C:/Users/Lucia/R-3.5.1/library/RcppParallel'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘RcppParallel’ had non-zero exit status

```

making me think RTools is part of the problem. Indeed I had installed the latest (April 2020) version of RTools which needs \>= R 4.0.0, so I reinstalled RTools version 3.5.

However, I still had the problem that RcppParallel installed version 5.0.0. even when explicitly telling to install \>=5.0.1., so I downloaded in manually from CRAN. [1]

Now loading RcppParallel seems to work.

```
> library(RcppParallel)
Warning message:
Paket ‘RcppParallel’ wurde unter R Version 4.0.2 erstellt

```

Now deleting rstan, restarting R, and running same as before I get:

```
Error: package or namespace load failed for ‘rstan’ in rbind(info, getNamespaceInfo(env, "S3methods")):
 number of columns of matrices must match (see arg 2)

```

So old error is gone, but now I get a new error I do not understand.

[1] Downloading r-release from [https://cran.r-project.org/web/packages/RcppParallel/index.html](https://cran.r-project.org/web/packages/RcppParallel/index.html), unzipping and copying it into the folder where my r packages lie

---

_[View the full topic](https://discourse.mc-stan.org/t/rstan-on-windows/16673)._
