File: obtainEnvironmentPath.Rd

package info (click to toggle)
r-bioc-basilisk 1.18.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: python: 12; sh: 4; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/obtainEnvironmentPath.R
\name{obtainEnvironmentPath}
\alias{obtainEnvironmentPath}
\title{Obtain the environment path}
\usage{
obtainEnvironmentPath(env)
}
\arguments{
\item{env}{A \linkS4class{BasiliskEnvironment} object specifying the environment.
Alternatively a string containing a path to an existing environment.}
}
\value{
String containing the path to an instantiated Conda environment.

For a BasiliskEnvironment \code{env}, the function will also lazily create the environment if \code{useSystemDir()} returns \code{FALSE}
and the environment does not already exist.
}
\description{
Obtain a path to a Conda environment, lazily installing it if necessary.
}
\examples{
if (.Platform$OS.type != "windows") {
 \dontshow{basilisk.utils::installConda()}

 tmploc <- file.path(tempdir(), "my_package_A")
 if (!file.exists(tmploc)) {
     setupBasiliskEnv(tmploc, c('pandas=1.4.3'))
 }
 obtainEnvironmentPath(tmploc)

 env <- BasiliskEnvironment("test_env", "basilisk", 
     packages=c("scikit-learn=1.1.1", "pandas=1.43.1"))
 \dontrun{obtainEnvironmentPath(env)}
}
}
\author{
Aaron Lun
}