Displaying your Data

1. The easiest way to display your data is to simply type the name of the variable itself. However, depending on the size of your data frame, this could get huge.

2. In order to display your data, read your data into R by typing: data<-read.csv("http://joeystanley.com/downloads/menu.csv").

3. Then type data into the console and click Run.

4. The following should then come up in your console if you use this example. There are more lines than are shown here that you should see in your console.

5. If you want to view your data like you would in a normal spreadsheet make menu a variable by typing: menu<-read.csv("http://joeystanley/downloads/menu.csv")

6. Then, type View(menu)

7. Make sure to run each line.

8. You will then be able to view your data on the top left of R-Studio under menu.

9. You can also just display portions of your data using head and tail, which, respectively, show the first and last couple of rows.

10. To see the first couple of rows type head(menu) as shown below.

11. You should then see the following in the console.

12. To see the last couple of rows type tail(menu) as shown below.

13. You should then see the following in the console.