Assorted Tips and Tricks for Windows Users - EpiModel/EpiModeling GitHub Wiki

Rtools and R Package Compilation

Compiling R packages (those that include any lower-level code like C/C++) requires installation of Rtools on Windows. The version of Rtools is specific to the version of R, so if you have a new version of R installed, also install a version of Rtools. To check that you can compile R packages correctly, try running:

install.packages("ergm", type = "source")

If that installs without error, you should be good to go.

AskPass error with SSH

If you receive the following error,ssh_askpass: posix_spawnp: No such file or directory, run the following line in your terminal:

set DISPLAY=

So to connect to an HPC you would do:

set DISPLAY=
ssh <username>@<hpc.url.com>

Sending files from your computer to and HPC with SCP

Windows and UNIX systems use different convention for writing file path. So to send the directory worfklows/networks_estimation/ from your computer to a project located in ~/projects/EpiModelHIV-Template/ on the HPC you do:

set DISPLAY=
scp -r workflows\networks_estimation <user>@<hpc.url.com>:projects/EpiModelHIV-Template/workflows/

Note that its workflows\networks_estimation. Windows uses back-slashes for directories and UNIX uses forward-slashes.

Show file extensions

By default, the windows file browser hides the file extension. This can lead to non functioning files as windows will often add ".txt" invisibly by default.

In "View" tick the "File name extensions" option (in the show / hide section on the right)

The ~ path on Windows

On UNIX systems, ~ represent the home directory of a user (usually /home/<username>/). If used in R on Windows, it points to "C:\Users<username>\My Documents".

So ~/GitHub/EpiModelHIV-p is understood by R as C:\Users\<username>\My Documents\GitHub\EpiModelHIV-p

⚠️ **GitHub.com Fallback** ⚠️