Displaying 1 result from an estimated 1 matches for "matcurrentfil".
Did you mean:
matcurrentfile
2001 Dec 21
0
read.table and as.vector (Was error message: "Error in model.frame")
...for (i in list.files(pattern="*.dmp")){
# read in the file
currentfile <- read.table(i)
# convert 3rd column to a vector:
n <- currentfile$V3
numn<-as.numeric(n)
# compute residuals
residuals <- residuals(lm(numn ~ vecwordlen))
# convert currentfile to matrix format
matcurrentfile <- as.matrix(currentfile)
# convert residuals to matrix format:
matres <- as.matrix(residuals)
# combine the original file with the residuals
bound <- cbind(matcurrentfile,matres)
# append to the output file:
write(t(bound),file="rawresidualsoutput",ncolumns=4,append=TRUE)...