In a nutshell:
class(USCA50)
Shows that the input is an object of the following classes: TSP, dist.
So any input must be fist a distance matrix. And that can be construct using dist()
by inputting locations and coordinates. Secondly, use TSP() constructor.
distance_matrix <- dist(coordinates)
tsp <- TSP(distance_matrix)
solve_TSP(tsp)