So far, all the code we’ve run is somewhat static. Variables get assinged a value in the script and very time we run it, the output is always be the same. We will see a lot more of this throughout this workshop, but for now we will introduce one more function that R provides, read.csv.
The print and cat functions are one way of how we get information out of our program, and the read.csv function is a way of getting data into it. The function will open and read a Comma-Separated Values (csv) file, parse it, and assign the data to a variable on the left hand side of the <-.
breast <-read.csv("https://raw.githubusercontent.com/Bristol-Training/beginning-r/refs/heads/main/data/GDS3716.soft",sep="\t",skip=99)print(breast[1:10,1:5])