Skip to content

Commit

Permalink
Some rough notes on environments (Python and R)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyheather committed Jun 6, 2024
1 parent f7eba31 commit 303474f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/environments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Python environments

Python -
\begin{itemize}
\item Conda, VirtualEnv, etc.
\item Docker - to do development inside container, VSCode Dev Containers extension allows you to open folder inside container - \href{https://code.visualstudio.com/docs/devcontainers/containers}{source 1}
\end{itemize}

## Conda

To see conda environments: `conda env list`
Expand Down
10 changes: 10 additions & 0 deletions r/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ self
packages
```

R -
\begin{itemize}
\item Renv
\item Posit Public Package Manager - can use Snapshot (earliest is Oct 2017, and 5 most recent versions of R), for Linux can install binary packages (which is much quicker, as usually R installs from source rather than binary unlike for Windows and Mac which makes it really slow) - \href{https://packagemanager.posit.co/client/#/repos/cran/setup}{source 1}, \href{https://docs.posit.co/faq/p3m-faq/#frequently-asked-questions}{source 2}
\item Groundhog - can go back to R 3.2 and April 2015 (and apparently can patch to go earlier) - \href{https://www.brodrigues.co/blog/2023-01-12-repro_r/}{source 1}
\item miniCRAN - \href{https://learn.microsoft.com/en-us/sql/machine-learning/package-management/create-a-local-package-repository-using-minicran?view=sql-server-ver16}{source 1}
\item Docker - requires license for non-academic (e.g. NHS) use - but Podman can drop in as replacement. To do development inside a container isn't natively supported by RStudio but can use RStudioServer via Rocker. By default, it runs in ephemeral mode - any code created or saved is lost when close - but you can use volume argument to mount local folders - \href{https://towardsdatascience.com/running-rstudio-inside-a-container-e9db5e809ff8}{source 1}
\end{itemize}


## Function setting default inputs
If default input is different to the input name, you won't have an issue. If it's the same you'll have an error.
```
Expand Down

0 comments on commit 303474f

Please sign in to comment.