hoxo-m 氏の pforeach を docker コンテナ jupyter/r-notebook:c54800018c2c でインストールしようとしたら tarball の展開でコケた…。Jupyter Project が提供する立派な公式コンテナなのに…。
解決策
- options(unzip = 'internal') する
- Sys.setenv(TAR = "/bin/tar") する
> install.packages("devtools", repos="https://cran.ism.ac.jp/") # 統数研に感謝
> getOption('unzip') #
''
> options(unzip = 'internal')
> getOption('unzip')
'internal'
> Sys.getenv("TAR")
'/bin/gtar'
> Sys.setenv(TAR = "/bin/tar") # https://github.com/conda-forge/r-devtools-feedstock/issues/4
> Sys.getenv("TAR")
'/bin/tar'
コンテナとか Jupyter の問題というより conda で作った環境の問題っぽい?。jupyter/r-notebook に gtar とか入っとらん。
他のバージョンのコンテナで起きる問題かどうかとか何も検証しとらんけど困った人がおったら辿り着けるように置いとくね。
Reference
- Jupyter notebook official r-notebook container: https://hub.docker.com/r/jupyter/r-notebook/
- hoxo-m/pforeach: https://github.com/hoxo-m/pforeach
- R で超簡単に並列処理を書けるパッケージ pforeach を作った: http://d.hatena.ne.jp/hoxo_m/20141222/p1
- 'unzip' must be a single character string when calling install_github: https://github.com/r-lib/devtools/issues/406
-
install_github
fails in conda environment on Linux: https://github.com/conda-forge/r-devtools-feedstock/issues/4
ねえちょっと聞いてる?