DeclareDesign / randomizr

randomizr: Easy-to-Use Tools for Common Forms of Random Assignment and Sampling
https://declaredesign.org/r/randomizr
Other
36 stars 9 forks source link

Installing randomizr #46

Closed kmunger closed 6 years ago

kmunger commented 6 years ago

Hey--having trouble installing the package v 0.9: I just updated R and restarted everything and all the magic that usually works. Any ideas?

`> install.packages("randomizr", repos = "http://r.declaredesign.org") Installing package into ‘C:/Users/kevin/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘randomizr’ Do you want to attempt to install these from sources? y/n: y installing the source package ‘randomizr’

trying URL 'http://r.declaredesign.org/src/contrib/randomizr_0.9.0.tar.gz' Content type 'application/gzip' length 76479 bytes (74 KB) downloaded 74 KB

arch - i386 c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -O3 -Wall -std=gnu99 -mtune=generic -c onload.c -o onload.o c:/Rtools/mingw_32/bin/gcc: not found make: [onload.o] Error 127 Warning: running command 'make -f "C:/PROGRA~1/R/R-34~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.3/share/make/winshlib.mk" SHLIB="randomizr.dll" OBJECTS="onload.o restrictedparts.o"' had status 2 ERROR: compilation failed for package 'randomizr'

nfultz commented 6 years ago

On Windows, usually you should install from binaries and not source packages ( which require Rtools) - it's possible that the repository index is out of date. A quick workaround would be to download the zip file directly and install it.

On Mon, Feb 19, 2018, 8:50 AM Kevin Munger notifications@github.com wrote:

Hey--having trouble installing the package v 0.9: I just updated R and restarted everything and all the magic that usually works. Any ideas?

`> install.packages("randomizr", repos = "http://r.declaredesign.org") Installing package into ‘C:/Users/kevin/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘randomizr’ Do you want to attempt to install these from sources? y/n: y installing the source package ‘randomizr’

trying URL 'http://r.declaredesign.org/src/contrib/randomizr_0.9.0.tar.gz' Content type 'application/gzip' length 76479 bytes (74 KB) downloaded 74 KB

  • installing source package 'randomizr' ... ** libs

arch - i386 c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA1/R/R-341.3/include" -DNDEBUG -O3 -Wall -std=gnu99 -mtune=generic -c onload.c -o onload.o c:/Rtools/mingw_32/bin/gcc: not found make: [onload.o] Error 127 Warning: running command 'make -f "C:/PROGRA1/R/R-341.3/etc/i386/Makeconf" -f "C:/PROGRA1/R/R-341.3/share/make/winshlib.mk" SHLIB="randomizr.dll" OBJECTS="onload.o restrictedparts.o"' had status 2 ERROR: compilation failed for package 'randomizr'

  • removing 'C:/Users/kevin/Documents/R/win-library/3.4/randomizr' In R CMD INSTALL Warning in install.packages : running command '"C:/PROGRA1/R/R-341.3/bin/x64/R" CMD INSTALL -l "C:\Users\kevin\Documents\R\win-library\3.4" C:\Users\kevin\AppData\Local\Temp\Rtmp2ZNnqq/downloaded_packages/randomizr_0.9.0.tar.gz' had status 1 Warning in install.packages : installation of package ‘randomizr’ had non-zero exit status`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DeclareDesign/randomizr/issues/46, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZjTh6tkFSM6a23ak31ZghzmF379DBdks5tWaZfgaJpZM4SK12T .

nfultz commented 6 years ago

You should also be able to install it from the URL -

install.packages("https://declaredesign.github.io/bin/windows/contrib/3.4/randomizr_0.9.0.zip", repos=NULL)

as in 1.

Can you please post your sessionInfo() - the repository indexes look fine and it would help in troubleshooting.

kmunger commented 6 years ago

Thanks!

I installed from the URL, no problem. But now when I try to load it in I get:

> library(randomizr)
Error: package ‘randomizr’ is not installed for 'arch = x64'
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3  
nfultz commented 6 years ago

Thanks. I think this will probably take a while to hunt down. Can you downgrade to 0.8 from CRAN in the meantime?

On Mon, Feb 19, 2018 at 9:51 AM, Kevin Munger notifications@github.com wrote:

Thanks!

I installed from the URL, no problem. But now when I try to load it in I get:

library(randomizr) Error: package ‘randomizr’ is not installed for 'arch = x64'

sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_3.4.3 tools_3.4.3

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DeclareDesign/randomizr/issues/46#issuecomment-366764010, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZjTpBuzZDUrCHTr_4e-BF1_vJQ2jpUks5tWbSUgaJpZM4SK12T .

kmunger commented 6 years ago

I would, but I want it to run DeclareDesign, the current version of which requires 0.9.

Thanks for the work on this, no rush!

kmunger commented 6 years ago

Error: package ‘randomizr’ 0.8.0 was found, but >= 0.9.0 is required by ‘DeclareDesign’

nfultz commented 6 years ago

We are now build biarch (i386 and x64) windows packages via r-appveyor, so you should be able to install randomizr at this time. I will go ahead and also update estimatr, as that also requires compilation.