There are numerous ways to get data into R. Here, I will go over one way that should cover most people’s situation. If this isn’t going to work for you (or if you think there might be an easier approach with your data) let me know.
I’m going to assume you have the data available either in excel (or excel like program), or it can easily be put in an excel spreadsheet. We will save it as a csv (Comma Separated Values) format, upload the file to ONID and then read the csv into R. If your data is already a .csv skip step 1.
You want your data arranged so that each row is a single subject, one column will contain the response, and the other the grouping variable (or explanatory variable if you are doing regression). The exception is if you have paired data in which case you want one pair per row.
As a very simple example I will import the data from homework 5.
Treatment: 4, 6
Control: 4, 8, 9
The first step is to rearrange the data to have one row for each observation. So, that it looks like:
Response Group
4 Treatment
6 Treatment
4 Control
8 Control
9 Control
If you are lucky you will already have your data in excel. If your dataset is small, you can consider entering it in by hand. If your data is large, talk to me about what format it is in and we might find an alternative method for you. Here is an excel sheet of the homework 5 data in the correct arrangement (I actually made this with Google Docs, which works well if you don’t have access to Excel).
Depending on what program you are using there will be a way to save your spreadsheet as a .csv
File -> Download as -> CSV
File -> Save as. Set Format to: Comma Separated Values, then save.
File -> Export. Click on CSV tab.
Here’s the homework 5 data, now as a csv. It will most likely open Excel (or like) if you open it. But if you force it to open in a text editor, you will see it just contains:
Response,Group
4,Treatment
6,Treatment
4,Control
6,Control
8,Control
Each value is separated from the next with a comma.
Open up RStudio, in the Files tab, click Upload, and choose your csv file. 
In RStudio, click on the Workspace tab, and then on “Import Dataset” -> “From text file”. A file browser will open up, locate the .csv file and click Open. You’ll see a dialog that gives you a few options on the import. Of particular importance is making sure if you have column names in your file, that Header is set to “Yes”. The column names should be bolded in the Data Frame box. Click “Import”.
RStudio will now run some R code to import your data. For the homework_5.csv, I see :
homework_5 <- read.csv("/nfs/chernobyl/u2/w/wickhamc/homework_5.csv")
Now my data is in the data.frame called homework_5 and I can operate on it as usual.
qplot(Group, Response, data = homework_5)