diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 14:34:54 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 14:34:54 +0200 |
| commit | 49680032d98a78964c76f04bf8d1fec501612147 (patch) | |
| tree | 248a232a123af94611179331b958ccba2f7e7305 /SyncRNG.R | |
| parent | allow installation as python module (diff) | |
| download | SyncRNG-49680032d98a78964c76f04bf8d1fec501612147.tar.gz SyncRNG-49680032d98a78964c76f04bf8d1fec501612147.zip | |
more reliable way to import SyncRNG from R
Diffstat (limited to 'SyncRNG.R')
| -rw-r--r-- | SyncRNG.R | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,6 +1,9 @@ library(methods) -script.dir <- normalizePath(dirname(sys.frame(1)$ofile)) +frame.files <- lapply(sys.frames(), function(x) x$ofile) +frame.files <- Filter(Negate(is.null), frame.files) + +script.dir <- normalizePath(dirname(frame.files[[length(frame.files)]])) source.file <- paste(script.dir, '/', 'RSyncRNG.so', sep='') dyn.load(source.file) |
