Since it seems many I know are in the early stages or about to start learning R, some thoughts.
Install R from cran https://cran.r-project.org
Do the added installs described in the text of the download page (Windows RTools, Mac XQuartz and Tools). R will work without them, but it is going to make responding to questions like “Do you want to install the newer source version” much easier to answer when you encounter such.
Install the free version of RStudio Desktop from RStudio https://www.rstudio.com/products/rstudio/download/. It just makes life easier.
I strongly suggest changing a few settings in RStudio. In Tools, Global Options…, General Tab, remove the tick from “Restore .RData into workspace at startup” and set “Save Workspace to .RData on exit” to “Never”. This ensures that R starts fresh each time (reloading things can be a problem if you reload things after updating R or helper libraries)
While R can read in all kinds of data, for starting off, you life is going to be easier if your data is well organised:
It is not that R cannot cope with other data, it is that you will need to do extra initial work figuring out what settings to add to control aspects of reading in data like skipping rows. And early on you haven’t yet gained a sense of where and how to look for such settings.
R, like similar tools, has the idea that you have a project folder you care about on this occasion, containing data & analysis scripts. After starting RStudio, tell R which folder to pay attention to by using the Session menu, Set Working Directory sub-menu, Choose Directory… command.
R is a functional language, which means to get things done you send data into a function and get back the result (like functions in Excel). To get things done you put together workflows of functions, changing the data in stages.
A metaphor for the process is a kitchen sausage machine or spice grinder. You feed in a set of ingredients, they get ground up, and you get a new thing different to the original parts. You can put in slightly different ingredients, and get the same basic outcome but with a different flavor.
For instance, if I was reading in a csv file called hospital.csv from my working directory, I might provide the ingredient of the name of the file as a piece of text (and text comes in quote marks)
read.csv("hospital.csv")
That prints the contents of the csv file to console, the equivalent of spilling ground sausage meat over the bench-top. To store it somewhere, we build an arrow to direct it, and name the storage (so we can then use that name when being an ingredient for another function).
hos <- read.csv("hospital.csv")
That is the equivalent of catching the ground sausage in a named bowl.
If we use different ingredients, we get a different result, for example skipping 3 rows in the input file
hos <- read.csv("hospital.csv", skip=3)
The help for each function lists the ingredients (settings). Sometimes it links you to other, related, help sections with settings you can use from those.