My train data looks like this:
Hi I am trying to predict language of a set of names in different english and non english characters.
When I try to read the input using the R command:
data = read.table("C:\\Users\\Sneha\\Documents\\study materials\\Independent Study\\train.txt",stringsAsFactors=FALSE,fileEncoding = "UTF-8")
I get the below error:
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 3 did not have 4 elements
In addition: Warning messages:
1: In read.table("C:\\Users\\Sneha\\Documents\\study materials\\Independent Study\\train.txt", :
invalid input found on input connection 'C:\Users\Sneha\Documents\study materials\Independent Study\train.txt'
2: In read.table("C:\\Users\\Sneha\\Documents\\study materials\\Independent Study\\train.txt", :
incomplete final line found by readTableHeader on 'C:\Users\Sneha\Documents\study materials\Independent Study\train.txt'
Can anyone suggest a better R command to read input of this sort.