I have an executable that outputs a table every time it is called by R. I then want to load the dataframe in R, but it contains lots of "!", for instance:
! A B C
0 1 2
3 3 2
1 1 1
!
3 4 2
2 2 3
5 2 5
!
3 4 2
.....
so that I get:
sim_stat <- read.table("C:/Users/Matteo/Desktop/Forest/Formind/formind-model/result/result.dia")
# Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
# line 2 did not have 11 elements
I need to read the data in R every second more or less, so is there a fast way to remove those "!" ? I am working in Windows. Thanks!