I'm just starting using R and I can't figure out how to infile files from any other program into R. I tried a basic example from going to Word to R. I used this website as a supposed example on how to do this http://www.mayin.org/ajayshah/KB/R/html/r1.html. So here is what I typed:
A<-read.table("C:\Users\anr28\Desktop\x.docx", sep=",", col.names=c("year", "my1", "my2"))
I had a document named "x" in Microsoft Word which according to the properties menu on my computer ends with docx. I followed exactly what they did in the example and it didn't work. This was the error messages printed out, but I don't know how to interpret them.
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 1 did not have 3 elements
In addition: Warning message:
In read.table("C:\\Users\\anr28\\Desktop\\x.docx", sep = ",", col.names = c("year", :
incomplete final line found by readTableHeader on 'C:\Users\anr28\Desktop\x.docx'
Please Help, I'm trying to learn this on my own and it's very frustrating not being able to bring files in to actually learn the crux of the program, which is what I'm really after. Thanks