Rstudio only importing 75 columns of data?

Hello!

I apologize if this is something that is common knowledge here, I am quite new to Rstudio and have been unsuccessful in finding any solutions to my problem in this forum and with other searches.

I have a rather large array of data in a CSV file, and for some reason when I try to read/import it into Rstudio it is reading 2x the number of rows and only 75 columns (there should be much much more than this). Is this just a bug with the program or is there any way to get around this?

Thank you very much in advance!

This sounds to me like malformed data, though just what the error is, I cannot say. Certainly R is not limited to 75 columns. Can you post the data somewhere so it can be inspected? Posting only the first few rows might be enough. If not, look at the data file near the end of the 75th column in the first row for something unexpected.

Are you reading this in with read.csv() or some other function?

Thank you for your reply!
I should have given more information on that, my apologies. I have used both [ data <- read.csv() ] and [data <- read.table() ].
I pulled out one row and compiled it using [ row <- c(data[1,]) ] but then my data class becomes "factor", but when I try summing all of the elements in this it gives me an incorrect value.
I didn't see anything that looked unexpected in my data! Is there a way I could upload a CSV file on here?

I do not think you can post a file here, though I am a fairly new participant, so I could be wrong. The alternative is to post it on a publicly available site like github or dropbox.

Rather than inspecting the imported data frame, as you did with data[1,], use a plain text editor (Notepad on Windows) to look at the csv file. You will then see the contents without any interpretation by R.

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