Skip to content

Commit

Permalink
Add PATH in zzz.R
Browse files Browse the repository at this point in the history
  • Loading branch information
rcqls committed Jun 21, 2024
1 parent 496149a commit eb6f2a6
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Rulia
Version: 0.0.1
Version: 0.1.0
Title: Julia Interface
Author: Cqls Team
Maintainer: Remy Drouilhet <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions R/windows/zzz.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.onLoad <- function(lib, pkg) {
## Use local=FALSE to allow easy loading of Tcl extensions
## Add julia PATH in R
Sys.setenv(PATH=paste(system('julia -e "println(Sys.BINDIR)"',intern=TRUE),Sys.getenv("PATH"),sep=";"))
library.dynam("Rulia", pkg, lib) #,local=FALSE)
}

Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ page, prefer the `juliaup` installation one.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rcqls/Rulia/HEAD/inst/install.sh)"
```

4. Julia package required for `Rulia` in mode statistic: `DataFrames`,
`CategoricalArrays`

## Quick live session

``` r
Expand Down Expand Up @@ -332,7 +335,7 @@ jl_set.seed
## jlusing(Random)
## invisible(jl(`Random.seed!`)(as.integer(n)))
## }
## <bytecode: 0x13ba72518>
## <bytecode: 0x130a8f0f0>
## <environment: namespace:Rulia>

``` r
Expand Down Expand Up @@ -715,6 +718,14 @@ jl(ca_R)
<details>
<summary>
<h1>
More details on <code>jl()</code>
</h1>
</summary>
TODO
</details>
<details>
<summary>
<h1>
<code>Rulia</code> in low level mode
</h1>
</summary>
Expand All @@ -723,6 +734,14 @@ TODO
<details>
<summary>
<h1>
<code>Rulia</code> utility functions
</h1>
</summary>
TODO
</details>
<details>
<summary>
<h1>
<code>R</code> Finalizers
</h1>
</summary>
Expand All @@ -734,4 +753,8 @@ wrapping some `jl_value_t*` value). Whenever the `jlvalue` is gabarge
collected, the reference on the associated `julia` value is also
dereferenced which is then cleaned up by the `julia` garbage collector.

Since the `julia` session is not persistent when the `R` session is,
what happens if a `jlvalue` object is still in the Workspace
(environment return by `globalenv()` or `.GlobalEnv`).

</details>
44 changes: 35 additions & 9 deletions inst/README/README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,37 @@ Also `Rulia` is the next step of the preliminary project called [`jl4R`](https:/

1. Install Julia (all Operating System)

Install [Julia](https://julialang.org/downloads/). For Windows users
don’t forget to select `PATH` in the installer. As mentionned in this page, prefer the `juliaup` installation one.
Install [Julia](https://julialang.org/downloads/)

2. Windows user setup
1. For any Operation system (Windows, MacOS and linux), as mentionned in the download page above, prefer the `juliaup` installation one.
2. Alternative installation (**to avoid** if possible), you can install from an installer.
For Windows users don’t forget to select `PATH` in the installer

- Install [RTools](https://cran.r-project.org/bin/windows/Rtools/) and a
terminal with bash (for instance, [Git
Bash](https://gitforwindows.org/))
- Add Rscript in the `PATH` environment variable (see for example [this
page](https://www.hanss.info/sebastian/post/rtools-path/))
2. Install `Rulia`

3. Bash installation (all Operating Systems)
* From binary (**Windows user only**)

1. Donwload [Rulia-0.0.1.zip](https://github.com/rcqls/Rulia/releases/download/v0.0.1/Rulia_0.0.1.zip)
2. Inside a terminal:

* From source

1. Windows user setup

- Install [RTools](https://cran.r-project.org/bin/windows/Rtools/) and a
terminal with bash (for instance, [Git
Bash](https://gitforwindows.org/))
- Add Rscript in the `PATH` environment variable (see for example [this
page](https://www.hanss.info/sebastian/post/rtools-path/))

2. Bash installation (all Operating Systems)

``` bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rcqls/Rulia/HEAD/inst/install.sh)"
```

4. Julia package required for `Rulia` in mode statistic: `DataFrames`, `CategoricalArrays`

## Quick live session

```{r}
Expand Down Expand Up @@ -291,11 +305,21 @@ jl(ca_R)
</details>


<details>
<summary><h1>More details on <code>jl()</code></h1></summary>
TODO
</details>

<details>
<summary><h1><code>Rulia</code> in low level mode</h1></summary>
TODO
</details>

<details>
<summary><h1><code>Rulia</code> utility functions</h1></summary>
TODO
</details>

<details>
<summary><h1><code>R</code> Finalizers</h1></summary>

Expand All @@ -306,4 +330,6 @@ wrapping some `jl_value_t*` value). Whenever the `jlvalue` is gabarge
collected, the reference on the associated `julia` value is also
dereferenced which is then cleaned up by the `julia` garbage collector.

Since the `julia` session is not persistent when the `R` session is, what happens if a `jlvalue` object is still in the Workspace (environment return by `globalenv()` or `.GlobalEnv`).

</details>

0 comments on commit eb6f2a6

Please sign in to comment.