Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-baumann committed Jan 20, 2024
1 parent 7117f19 commit d19900d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dev/running_r_or_shell_code_in_nix_from_r.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ We first create a isolated directory to prepare for a Nix environment, and write

```{r, eval=FALSE}
library("rix")
path_env_1 <- file.path(".", "_env_1_R4-2-0")
path_env_1 <- file.path(".", "_env_1_R-4-2-0")
init(
project_path = path_env_1,
rprofile_action = "overwrite",
Expand Down Expand Up @@ -70,10 +70,10 @@ df_as_vector <- function(x) {
out <- as.vector(x = x, mode = "list")
return(out)
}
(out_system <- as.vector(x = df, mode ="list"))
(out_system <- df_as_vector(x = df))
```

Then, we will evaluate this test code through a `nix-shell` R session. This adds both build-time and run-time purity with the declarative Nix software configuration we have made above. with_nix leverages the following principles under the hood:
Then, we will evaluate this test code through a `nix-shell` R session. This adds both build-time and run-time purity with the declarative Nix software configuration we have made earlier. `with_nix()` leverages the following principles under the hood:

1. **Computing on the Language:** Manipulating language objects using code.

Expand Down
6 changes: 3 additions & 3 deletions vignettes/running-r-or-shell-code-in-nix-from-r.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ We first create a isolated directory to prepare for a Nix environment, and write

```{r eval = FALSE}
library("rix")
path_env_1 <- file.path(".", "_env_1_R4-2-0")
path_env_1 <- file.path(".", "_env_1_R-4-2-0")
init(
project_path = path_env_1,
rprofile_action = "overwrite",
Expand Down Expand Up @@ -92,10 +92,10 @@ df_as_vector <- function(x) {
out <- as.vector(x = x, mode = "list")
return(out)
}
(out_system <- as.vector(x = df, mode ="list"))
(out_system <- df_as_vector(x = df))
```

Then, we will evaluate this test code through a `nix-shell` R session. This adds both build-time and run-time purity with the declarative Nix software configuration we have made above. with_nix leverages the following principles under the hood:
Then, we will evaluate this test code through a `nix-shell` R session. This adds both build-time and run-time purity with the declarative Nix software configuration we have made earlier. `with_nix()` leverages the following principles under the hood:

1. **Computing on the Language:** Manipulating language objects using code.

Expand Down

0 comments on commit d19900d

Please sign in to comment.