Last active
August 29, 2015 14:19
-
-
Save meaganewaller/6ee9c2f59211216f4909 to your computer and use it in GitHub Desktop.
Reading Data in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myConnection <- file("foo.txt", "r") | |
data <- read.csv(myConnection) | |
close(myConnection) | |
# the same thing as | |
data <- read.csv("foo.txt") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initial <- read.table("dataset.txt", nrows = 100) | |
classes <- sapply(initial, class) | |
tabAll <- read.table("dataset.txt", colClass = classes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment