0

I have a data set in an .xls format and i saved it as .csv file. When I'm trying to read it with

read.table("Gene.csv", header=TRUE, sep=",") it shows:

Error in read.table("Gene.csv", header = TRUE, sep = ",") : more columns than column names

I think that maybe the csv file has some format issues because there are unfilled spaces under one Column. Any help would be grateful !!!!

1 Answer 1

-2

options(warn=3)

Then run your code looking for an error message.

> dat <- read.table("June2014-Feb2015.csv",header=TRUE,sep=",")
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
  line 3 did not have 10 elements

so I checked line 3 and viola , it was fixed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.