Hello everyone,

I am a beginner in R. 
In order to verify my data files (which are tables with values separated by
spaces in .txt files), I wanr to count the number of columns in each file.

So I made the formula that works:

ncol(read.table("my_file.txt", header = FALSE, sep = ""))

The problem is I have 257 files to check in the same folder! I would have to
automate this function for me to get the number of columns in each of his
files.

I think I shoud use this formula :

list.files(path="C:/.....")

But I don't know how to...

Could you help me ?

Thanks. 



--
View this message in context: 
http://r.789695.n4.nabble.com/Apply-formula-to-several-files-tp4725516.html
Sent from the datatable-help mailing list archive at Nabble.com.
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to