amrei-stammann / alpaca

An R-package for fitting glm's with high-dimensional k-way fixed effects
43 stars 6 forks source link

can't run example from alpaca::feglm #3

Closed vincentanutama closed 6 years ago

vincentanutama commented 6 years ago

Hi Amrei, I tried running the feglm function on your vignette but I got the following error message. Could you help why? (I omitted build_vignettes = TRUE when I installed the package because including it results in an error, and I wonder if this is why feglm failed.) Thanks, Vincent

library(alpaca) data <- simGLM(1000L, 200L, 1805L, model = "logit")

Fit 'feglm()'

mod <- alpaca::feglm(y ~ x1 + x2 + x3 | i + t, data) Error in .subset2(x, i, exact = exact) : invalid subscript type 'symbol'

amrei-stammann commented 6 years ago

Dear Vincent,

it is hard to say without further information. Can you give us a bit more information about your OS / R-version and especially data.table version? Updating data.table and reinstall alpaca might fix this issue.

Best,

Amrei

vincentanutama commented 6 years ago

Sorry for not including it prior. Here you go. I tried uninstalling data.table and alpaca and reinstalling them, but am still to no avail. Thanks again for diagnosing.

sessionInfo() R version 3.4.1 Patched (2017-07-07 r72904) 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 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

other attached packages: [1] alpaca_0.2 data.table_1.11.4

loaded via a namespace (and not attached): [1] MASS_7.3-50 httr_1.3.1 compiler_3.4.1 R6_2.2.2 tools_3.4.1 withr_2.1.2 curl_3.2 Rcpp_0.12.18 memoise_1.1.0 knitr_1.20 git2r_0.23.0
[12] Formula_1.2-3 digest_0.6.15 devtools_1.13.6

amrei-stammann commented 6 years ago

So far the only difference is the R-version. We successfully tested the package on (3.4.4, 3.5.0, 3.5.1). I have no other idea yet.

vincentanutama commented 6 years ago

I updated my R to 3.5.1 and tried to reinstall alpaca. I encountered the following error message:

sessionInfo() R version 3.5.1 (2018-07-02) 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 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

other attached packages: [1] data.table_1.11.4

loaded via a namespace (and not attached): [1] httr_1.3.1 compiler_3.5.1 R6_2.2.2 tools_3.5.1 withr_2.1.2 curl_3.2 memoise_1.1.0 git2r_0.23.0 digest_0.6.15 devtools_1.13.6

devtools::install_github("amrei-stammann/alpaca") Downloading GitHub repo amrei-stammann/alpaca@master from URL https://api.github.com/repos/amrei-stammann/alpaca/zipball/master WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.4)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/. Installation failed: Could not find build tools necessary to build alpaca

install.packages('Rtools') Installing package into ‘C:/Users/tanutama/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘Rtools’ is not available (for R version 3.5.1)

amrei-stammann commented 6 years ago

You also have to update your R-tools version. https://cran.r-project.org/bin/windows/Rtools/ Hope this will fix it.