[R] count how many row i have in a txt file in a directory

Hans Ekbrand hans at sociologi.cjb.net
Sun Feb 26 22:10:11 CET 2012


On Sun, Feb 26, 2012 at 05:06:42PM +0100, gianni lavaredo wrote:
> thanks Hans.
> 
> It's true your idea improve the speed in the analysis respect a row-by-row
> loop.
> 
> Sorry if I ask these questions to better understand and better performening
> my code:
> 
> 1) split command in GNU coreutils, $ split -l 1000000 testmem.csv
> i never use this command. Is it possibile to coding in R or it's an
> external command?

external. split is - as I wrote - part of GNU coreutils.

> do you have some links where i can study this command. Thanks

http://www.gnu.org/software/coreutils/

> 2) is it possible to work with txt file?

"txt file" is not a well defined concept, such a file could very well
be a csv file, see http://en.wikipedia.org/wiki/Comma-separated_values

?read.csv



More information about the R-help mailing list