Reading Data into Excel - Patricia Hoffman PhD



Reading Data into Excel

Download it from the web at



Then right click on it and select “Open With” then “Choose Program”

Reading Data into Excel

Choose Excel

Oops! Everything is in the first column!

Solution: click on the first column then select

“Data” then “Text to Columns”

Choose “Delimited” and hit “Next”

Check only “Space” then “Next” again

Click “Finish”

Reading Data into R

Download it from the web at



What is your working directory?

> getwd()

Change it to your deskop:

> setwd("C:/Documents and Settings/Administrator/Desktop")

Read it in:

> data data[1:5,]

V1 V2 V3 V4 V5 V6 V7 V8 V9

1 82.95.120.160 - - [14/May/2009:00:10:34 -0700] GET HTTP/1.1 200 112813

2 82.95.120.160 - - [14/May/2009:00:10:35 -0700] GET style.css HTTP/1.1 200 639

3 82.95.120.160 - - [14/May/2009:00:10:36 -0700] GET logo.png HTTP/1.1 200 5410

4 82.95.120.160 - - [14/May/2009:00:10:43 -0700] GET favicon.ico HTTP/1.1 404 -

5 66.249.70.102 - - [14/May/2009:00:35:33 -0700] GET cgi/tweets.py?q=denver HTTP/1.1 200 7322 -

V10

1 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16

2 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16

3 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16

4 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16

5 Mozilla/5.0 (compatible; Googlebot/2.1; +)

Look at the first column:

> data[,1]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download