The problem is that a "~" directory is created in my home, when using the *Hub packages.
First of all, this is only an issue for me using R-devel, which I build from source. Using the Mac binary for R 3.3.1 this does not present the problem.
I can trace it to path.expand()'s behavior, which I know is used to create the location of the *Hub cache directories:
> path.expand("~") [1] "/Users/love/~"
BTW, it seems like adding a slash fixes this:
> path.expand("~/") [1] "/Users/love/"
One solution that I've used is to put the following lines in my .Rprofile:
options(EXPERIMENT_HUB_CACHE="/Users/love/.ExperimentHub") options(ANNOTATION_HUB_CACHE="/Users/love/.AnnotationHub")
However, when I build software packages that use the *Hub packages, I believe the init files aren't used and I again end up with a "~" dir in my home.
My session info:
R Under development (unstable) (2016-08-22 r71129) Platform: x86_64-apple-darwin15.5.0 (64-bit) Running under: OS X El Capitan 10.11.5 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] ExperimentHub_0.101.12 AnnotationHub_2.5.11 BiocGenerics_0.19.2 loaded via a namespace (and not attached): [1] Rcpp_0.12.6 IRanges_2.7.14 [3] digest_0.6.10 mime_0.5 [5] R6_2.1.3 xtable_1.8-2 [7] DBI_0.5 stats4_3.4.0 [9] RSQLite_1.0.0 BiocInstaller_1.23.6 [11] httr_1.2.1 S4Vectors_0.11.13 [13] Biobase_2.33.0 shiny_0.13.2 [15] httpuv_1.3.3 AnnotationDbi_1.35.4 [17] htmltools_0.3.5 interactiveDisplayBase_1.11.3
Interesting - looks like it may be due to differences across platforms: with R-devel on linux it works fine for me without the trailing slash:
path.expand("~")
results in[1] "/home/keith"
p.s. I still feel that this is not the right system for reporting and tracking bugs.
I get the same, i.e.
and I'm also building my R on Mac from source; what I find interesting is that I get this only in the terminal, when I run R in Emacs (iESS mode) I get
"/Users/jo"
. It wasn't bothering me much since I run all my analyses through emacs, but it would be nice if it could be fixed as you suggest.Looks like it depends on the readline support of the terminal which can be checked with
capabilities("cledit")
(see?path.expand
)When I run this I get TRUE:
Note that I do have expansion capabilities, it just tacks on an additional "~".