renv2nix | R Documentation |
renv2nix
renv2nix(
renv_lock_path = "renv.lock",
project_path,
return_rix_call = FALSE,
method = c("fast", "accurate"),
override_r_ver = NULL,
...
)
renv_lock_path |
Character, path of the renv.lock file, defaults to "renv.lock" |
project_path |
Character, where to write |
return_rix_call |
Logical, return the generated rix function call
instead of evaluating it this is for debugging purposes, defaults to
|
method |
Character, the method of generating a nix environment from an
renv.lock file. "fast" is an inexact conversion which simply extracts the R
version and a list of all the packages in an renv.lock file and adds them
to the |
override_r_ver |
Character, defaults to NULL, override the R version
defined in the |
... |
Arguments passed on to
|
In order for this function to work properly, we recommend not
running it inside the same folder as an existing {renv}
project. Instead,
run it from a new, empty directory which path you pass to project_path
,
and use renv_lock_path
to point to the renv.lock
file in the original
{renv}
folder. We recommend that you start from an empty folder to hold
your new Nix project, and copy the renv.lock
file only (not any of the
other files and folders generated by {renv}
) and then call renv2nix()
there. For more details, see vignette("f-renv2nix")
.
Nothing, this function is called for its side effects only, unless
return_rix_call = TRUE
in which case an unevaluated call to rix()
is
returned
## Not run:
# if the lock file is in another folder
renv2nix(
renv_lock_path = "path/to/original/renv_project/renv.lock",
project_path = "path/to/rix_project"
)
# you could also copy the renv.lock file in the folder of the Nix
# project (don’t copy any other files generated by `{renv}`)
renv2nix(
renv_lock_path = "path/to/rix_project/renv.lock",
project_path = "path/to/rix_project"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.