Hi. In seek() the 'rw' argument takes three possible values, i.e. "" (empty), "read", or "write" (partial matches allowed).
I was bitten by the meaning of "" when I in a loop used seek(con, where=w) followed by a seek(con, where=w, rw="write"). I know that everything is (magically) in the help (?seek) and so was the description of rw="": "File connections can be open for both writing/appending, in which case R keeps separate positions for reading and writing. Which 'seek' refers to can be set by its 'rw' argument: the default is the last mode (reading or writing) which was used." However, may I suggest to change the default value to "last" (or "recent" or similar) to make the effect of the default more explicit (and only support "" for backward compatibility). /Henrik ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel