# install.packages("remotes")
remotes::install_github("choisy/nu")
Everything below relies on the use of the remoter
package. Load it:
library(nu)
nu::ddir(dir = "Marc", ip = nu::c1, user = "ubuntu", key = "~/.ssh/GROUP-Modelling.pem")
where dir
is the name of the directory on the remote server we want to
look at, ip
is the IP address of the remote server, user
is the user
name for the SSH connectionn, and key
is the path on your local
computer to the key for the SSH connection.
nu::dps(ip = nu::c1, user = "ubuntu", key = "~/.ssh/GROUP-Modelling.pem")
with the same definitions of the arguments as for nu::ddir()
send_file(file = "my_script.R", ip = nu::c1, dir = "Marc", user = "ubuntu", key = "~/.ssh/GROUP-Modelling.pem")
where file
is the name of the file you want to send. This file has to
be in your working directory. dir
is the name of the directory on the
remote server where you want to send this file. Note that this directory
needs to exist. The definition of the other arguments are the same as
for nu::ddir()``nu::ddir()
.
The function you should use for that is run_script_bg()
:
run_script_bg(file = "my_script.R", ip = nu::c1, dir = "Marc", user = "ubuntu", key = "~/.ssh/GROUP-Modelling.pem")
dir
indicates where you want to run your R session on the remote
server. This is important as it determines where your files
(e.g. calculations results) will be saved. The definition of the other
arguments are the same as for nu::ddir()``nu::ddir()
.
fetch_file(file = "sim1.rds", ip = nu::c1, dir = "Marc", user = "ubuntu", key = "~/.ssh/GROUP-Modelling.pem")
where file
is the name of the file of the dir
directory that you
want to bring to your local computer. The definition of the other
arguments are the same as for nu::ddir()``nu::ddir()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.