JRBatHolmes
JRBatHolmes

Reputation: 88

Importing data from csv File to R

I had troubles importing data I need from .csv files to R.
So to check, I created a simple .csv from excel with 2 columns and 3 rows - it reads like this in notepad

what,now
1,4
2,5
3,6

When I try import this data into R

d <- read.csv("D:/Book1.csv")

it gives a warning message,

Warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'D:/Book1.csv'

and then when I view the data, it's some gibberish.

What do I do?

Upvotes: 0

Views: 944

Answers (1)

JRBatHolmes
JRBatHolmes

Reputation: 88

I was using a work PC, and the files were encrypted - which was the reason why importing data into R was not working. I bypassed it by copying data into a text document. Thanks everyone!

Upvotes: 0

Related Questions