I have a fixed width file that I am reading in this way:
library(readr)
mydata <- read.fwf(file="myfile.txt", widths = c(12, 7, etc))
It returns:
Error in substring(x, first, last) :
invalid multibyte string at '<cd>S '
As the file is pretty big I would like to find out what is the line number in the file that returns the error. How can I get that using R?