Displaying 5 results from an estimated 5 matches for "flnm".
Did you mean:
blnm
2011 Aug 25
2
how to read a group of files into one dataset?
for example : I have files with the name
"ma01.dat","ma02.dat","ma03.dat","ma04.dat",I want to read the data in
these files into one data.frame
flnm<-paste("obs",101:114,"_err.dat",sep="")
newdata<-read.table(flnm,skip=2)
data<-(flnm,skip=2)
but the data only contains data from the flnm[1]
I also tried as below :
for (i in 1:9) {
data<-read.table(flnm[i],skip=2)
}
but i failed how could I modified my...
2011 Sep 01
3
how to get the varifying character with two variables?
hi R user
mtdno<-paste("data",1:3,sep="")
tyno<-paste("obs",1:5,sep="")
flnm<-paste(mtdno,tyno,"_err.dat",sep="")
flnm is
[1] "data1obs1_err.dat" "data2obs2_err.dat" "data3obs3_err.dat"
[4] "data1obs4_err.dat" "data2obs5_err.dat"
but actually what i want is data from 1 to 3 and obs from 1 to 5. thu...
2011 Sep 02
2
how to return back to go on my cycle while read my files
hi ,when i read a lots of files
for (i in 1:totnum)
{
cop_x_data<-read.table(flnm[i],skip=2)
if(i==1) {cop_data=cop_x_data}
else {cop_data=rbind(cop_data,cop_x_data)}
}
some of the files are missing . so this loop can not go on .I wonder how can
I go on
the loop cycle while reading the files just like the command
read(unit,err=linenum) in fortran ?
thank you .
--
TANG Jie...
2012 Jun 12
1
how to skip out and go on read while the read.table meet with a null file
hi ,R users
I read a series of file by the command shown as below.
cop_x_data<-read.table(flnm,skip=2)
the first two line of the files are headfile and I skip them.
and sometimes the original data file is null and there is no any data
in the file except for the head information.
At this situation,my command would be in the error and tell me that
there is not data in the file and can not go...
2012 Jun 28
1
how to skip from some null file and go on reading?
hi ,
I am reading a series of files by the command shown as below.
cop_x_data<-read.table(flnm(i)
,skip=2,allowEscapes=TRUE,blank.lines.skip=TRUE)
the first two line of the files are headfile and I skip them by skip=2.
and sometimes the data file is null and there is no any data
in the file except for the head information.
At this situation,my command would be in the error and tell me that...