R studio putting all the observations in one column for a .csv file

I am trying to read a file using read.csv from a github file.

It is reading the file but it is putting all the observations into one column whereas the same file has 489 observations and 4 columns.

Example of the code :

url<- "https://github.com~/housing.csv"

download.file(url, destfile = "bh")

d1<-read.csv("bh", header=TRUE,sep=",",quote =""",dec = ".", fill = TRUE,comment.char = "")

dim(jd1)
[1] 606 1

When I read this very same file from my local hard drive - it gives me the correct answer. so why is it coming differently ?

The data set actually has 489 variables and 4 columns

I am submitting a project , so I need to read the file from the github itself.

Please help

Getting one column is usually a sign that the separator is not set correctly. If you look at the csv file with a text editor, can you confirm that the fields are separated by commas?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.