Some error occured while loading page for you. Please try again.
We use cookies to ensure you have the best browsing experience on our website.
Please read our cookie policy for more information about how we use cookies.
I agree that using read.delim o read.table is a lot easier than reading lines and then trying to build vectors and frames. The trick is to read the whole imput as a data frame an then slice it to get the problem data.
I agree that using read.delim o read.table is a lot easier than reading lines and then trying to build vectors and frames. The trick is to read the whole imput as a data frame an then slice it to get the problem data.
Example:
tot=read.table(file="stdin",header=FALSE,fill=TRUE,sep=" ")
f=tot$V1[1]
n=tot$V2[1]
origen=tot[2:(n+1),]
t=tot$V1[n+2]
desti=tot[(n+3):(n+2+t),]
Add Reply Preview cancel