[R] Fread: add one to skip string identifier

Trevor Davies davies.trevor at gmail.com
Fri Jun 26 18:16:57 CEST 2015


I'm trying to read in a file using the function fread.

The file that I'm trying to read in has about 100 lines of information I
don't want prior to getting to my matrix of data that I do want.  On the
line prior to the data I want there is always a string identifier "*end*"

The following fread call:

impcoord <- fread('H:/SBE19plus_01907535_2015_06_17_0093.cnv',skip="*END*")

almost gets me there but it starts reading AT *END* and I'd like to have it
start the line after.  I can't figure out how to make this work.

I know I could have a two step function where I have a function scan the
file to Identify the line that has *END* but I thought I could just do it
with one fread() call.

thanks for the help.
Trevor

	[[alternative HTML version deleted]]



More information about the R-help mailing list