Skip to content
Prev 381706 / 398502 Next

Can file size affect how na.strings operates in a read.table call?

Thanks Bill and Jeff

strip.white did not change the outcomes.

However, your inputs led me to compare the raw content of the files (ie, outside of an IDE) and found difference in how the apparent -99 were stored. In the big file, some -99 are stored as floats rather than integers and thus included a decimal point and trailing zeros.

The creation of the smaller files resulted in the removal of the decimal point and trailing zeros, explaining why read.table provided the "right " response on these smaller files.

So, it looks like this is the problem and that some additional post-processing may be warranted.

Thanks for the hints.
Message-ID: <CH2PR19MB3864F4E1151E7B8B8948AFAA92710@CH2PR19MB3864.namprd19.prod.outlook.com>
In-Reply-To: <CAF8bMcaj2T7_p7hg_E-ZE4YK6MBVmW47n9K+5cmwKYWMzc3rxQ@mail.gmail.com>