There is a strange thing when i use read.table to get data.
data=read.table('/home/tiger/nasdaqlisted.txt',head=T,sep='|')
dim(data)
[1] 750 6
in fact,there are 2454 lines in the file,what’s wrong?
http://freeuploadfiles.com/bb3cwypih2d2
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the issue comes from the fact that some of the names contain the quote character
'(in names such asAngie's List, Inc.).The default argument in
read.tableforquotebeing"\"'"it needs to be changed for your data to be read correctly.As per @mrdwab suggestion,
read.delimhaving"\""as defaultquoteargument will work without needing any change: