################################################################################ ########### create a function to store a nts file in a matrix ################## ################################################################################ read.nts=function (file.name) { # open the tps file and put each line as a character nts=scan(file.name,what="char",sep="\n") # collect the file specification spe=as.numeric(unlist(strsplit(nts[2]," "))) # the first one is 1, the second the number of lines, the second the number of columns # collect all the values values=read.table(file.name,skip=2) # display the matrix values }