Displaying 1 result from an estimated 1 matches for "dload_60000".
2013 Mar 21
0
how do I read certain files from a directory based on number of columns?
...t;File2.txt" "File3.txt"
>read.table("File2.txt",header=TRUE,stringsAsFactors=FALSE)
># dload_40000 dload_20000 d1
>#1 1 4 3
>#2 4 9 9
>#3 3 8 3
>
>lapply(list.files(),function(x)
{x1<-x[any(scan(file=x,what="",nlines=1)%in%
>"dload_60000")]; if(length(x1)!=0)
>read.table(x1,header=TRUE,stringsAsFactors=FALSE) else NULL})
>#Read 3 items
>#Read 3 items
>#Read 1 item
>#[[1]]
> # dload_40000 dload_60000 d1
>#1 1 5 3
>#2 4 6 9
>#3 3 4 3
>
>#[[2]]
>#NULL
>
>#[[3]]
> # dload_60...