OHDSI / Andromeda

AsynchroNous Disk-based Representation of MassivE DAta: An R package aimed at replacing ff for storing large data objects.
https://ohdsi.github.io/Andromeda/
11 stars 10 forks source link

Relative `andromedaTempFile` causes write issue in some environments #2

Closed msuchard closed 2 years ago

msuchard commented 4 years ago

This option(andromedaTempFile = "~/andromeda") causes a write issue in (at least) one RstudioServer/linux environment, while option(andromedaTempFile = "/home/user/andromeda") works just fine.

Am not sure what the issue is, but posting here so that we do not forget the work-around.

schuemie commented 4 years ago

Maybe we could use path.expand when reading the andromedaTempFile option?

msuchard commented 4 years ago

That's a great idea. I'll check it out when I can coordinate access to this environment again. Thanks!

msuchard commented 4 years ago

I can confirm that in this environment:

path.expand("~/andromeda") expands to "/home/username/andromeda". I'll make the patch.

ablack3 commented 2 years ago

This is fixed as far as I know. Closing the issue.

library(Andromeda)
#> Loading required package: dplyr
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

options(andromedaTempFile = "~/andromeda")

getOption("andromedaTempFile")
#> [1] "~/andromeda"

db <- andromeda()

db
#> # Andromeda object
#> # Physical location:  /var/folders/xx/01v98b6546ldnm1rg1_bvk000000gn/T//Rtmpv1z0DM/file11f8d42207d4b.sqlite
#> 
#> Tables:

Created on 2021-12-15 by the reprex package (v2.0.1)