Reputation: 348
I am trying to read this data file.
x<-read.table("mydata",header=FALSE) > mode(x) [1] "list"
How can I read it as a vector? It can be done with unlist(x), but I want a simpler way.
unlist(x)
Upvotes: 2
Views: 409
Reputation: 960
Via scan:
scan
x <- scan("mydata")
Simple enough?
Upvotes: 6