@rok_cesnovar Thank you for your posting on behalf of me.
@rok_cesnovar and @andrjohns I really appreciate your quick and helpful replies.
Something weird happened and running Powershell via RStudio (i.e. Powershell as admin in the Terminal pane of the RStudio, not the original Powershell) saved me. I was able to download and deploy
C:\rtools40\var\lib\pacman\local. And Powershell in the Terminal pane successfully recognize
mingw32-make command and
mingw32-make --version returns:
GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <!(chrome-extension://ohhcpmplhhiiaoiddkfboafbhiknefdf/TMToolbar/image/tooltip/webicon_green.png)[http://gnu.org/licenses/gpl.html](http://gnu.org/licenses/gpl.html?fbclid=IwAR0Xt67tI-Km9Q59XhHilVJhgFM00OkZ9_mUB1hdsvWTsgMoeoWBJ2Om_Qk)>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Although Rtools Bash (msys2.exe) and the original Powershell do not recognize mingw32-make.exe (i.e. both fails to find the
mingw32-make command), now I succeeded in running all codes in https://mc-stan.org/cmdstanr/articles/cmdstanr.html
So, for me, at least, executing the codes you suggested here in Powershell from RStudio’s Terminal pane is the key to solve! Again, thank you for your kind assistance!