install.packages("swirl")
library("swirl")
swirl()
lab 1 - command line and R
We will learn to use the command line by doing. Follow the instructions below.
command line
If you are on a Mac or Linux, open your Terminal (or similar) application. On Windows, you’ll need something like MobaXterm.
From the command prompt, clone this GitHub repository: git clone https://github.com/jperkel/nature_bash.git.
Enter the newly created directory: cd nature_bash.
Make the scripts executable: chmod +x *.sh.
Run the scripts in numeric order, being sure to prepend each file name with a period and slash, eg: ./01_init.sh). This tells the shell where to find these scripts (i.e., the current directory) when that location is not included in your file search PATH variable.
You don’t have to type the complete filename. Once you type enough of the filename to be uniquely recognized, you can use Bash’s ‘autocomplete’ feature to fill in the rest of the name for you. Try it: type ./01 and then hit the TAB key to complete the command.
There are six scripts in total:
Feel free to use chatGPT or similar to explain the scripts if you are not familiar with these commands.
R introduction
You are probably familiar with R. If not, start learning with swirl
Command line basics
For the bare minimum list of commands check out this link