Reputation: 3026
I have a csv
file with 10198 rows and 16 columns. When I use the following code, it seems like I am missing some data:
dat = read.table(file = "clipboard", sep = "\t", header = TRUE)
> dim(dat)
[1] 9633 16
while read.csv
returns correct data:
dat = read.csv(file = "PRM.csv", sep = "", header = TRUE)
> dim(dat)
[1] 10198 16
Does anybody know what is going on here? Is a reproducable dataset required for this?
Upvotes: 1
Views: 298
Reputation: 1845
Maybe the issue is that in first line you use a wrong sep field, try to use:
dat = read.table(file = "clipboard", sep = "", header = TRUE)
and also try to add an extension to your file, e.g. clipboard.txt
Upvotes: 1