Hi Ian,
I checked your example again and found the problem in tsp. fix(x) seems
to create column names but not row names which exposes a bug in as.ATSP
in tsp.
This code replicates your error message:
library(TSP)
x <- rbind(c(1,2,3,4), c(1,0,11,5), c(2,4,0,6), c(3,5,6,0))
colnames(x) <- 1:4
#rownames(x) <- 1:4
atsp <- ATSP(x)
tsp <- reformulate_ATSP_as_TSP(atsp)
if you uncomment the rownames line then it works. I already fixed the
code in tsp to check for missing col/row names in the matrix. This fix
will be part of the next release. For now please just add row names to
the matrix.
Thanks for the bug report!
-Michael
--
Dr. Michael Hahsler, Visiting Assistant Professor
Department of Computer Science and Engineering
Lyle School of Engineering
Southern Methodist University, Dallas, Texas
(214) 768-8878 * [email protected] * http://lyle.smu.edu/~mhahsler
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.