[R] List of tables needed
Jackson Rodrigues
j@ck@onmrodr|gue@ @end|ng |rom gm@||@com
Sun Jul 21 02:17:56 CEST 2019
Dear all,
My name is Jackson and I need a help in applying functions to a list of
tables.
Could anyone help me to use loop/array on a list of tables ?
I need to apply a group of functions (listed below) to a list of tables
I am not that good with loops or arrays or multiple functions.
So, could some of you help me ?
mylist <- list.files(full.names = F, pattern =".asc$")
mylist
[1] table1.asc" " table2.asc"
[3] " table3.asc" " table4.asc "
[5] " table5.asc "
The <https://www.facebook.com/hashtag/the?source=feed_text&epa=HASHTAG>
following
functions should be applied to each table from mylist
######
in.r=read.table(mylist,sep="",skip=7,header=F)
cl=read.table(mylist,sep="",nrows=1,header=F)
rw=read.table(mylist,sep="",nrows=1,skip=1,header=F)
xll=read.table(mylist,sep="",nrows=1,skip=2,header=F)
yll=read.table(mylist,sep="",nrows=1,skip=3,header=F)
xdim=read.table(mylist,sep="",nrows=1,skip=4,header=F)
ydim=read.table(mylist,sep="",nrows=1,skip=5,header=F)
nd=read.table(mylist,sep="",nrows=1,skip=6,header=F)
#Convert
<https://www.facebook.com/hashtag/convert?source=feed_text&epa=HASHTAG> to
Raster
in.rr=raster(as.matrix(in.r))
in.rr[in.rr == -9999]=NA
x.max=xll$V2+(xdim$V2*cl$V2)
y.max=yll$V2+(ydim$V2*rw$V2)
extent(in.rr)=c(xll$V2,x.max,yll$V2,y.max)
#################
Thank you all in advance.
Jackson Rodrigues
[[alternative HTML version deleted]]
More information about the R-help
mailing list