找回密码
 注册
查看: 1976|回复: 0

R语言 TSP包 USCA()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-1 12:48:06 | 显示全部楼层 |阅读模式
USCA(TSP)
USCA()所属R语言包:TSP

                                        USCA312/USCA50 – 312/50 cities in the US and Canada
                                         USCA312/USCA50  -  312/50个城市,在美国和加拿大

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The USCA312 dataset contains the distances between 312 cities in the US and Canada as an object of class TSP.  USCA50 is a subset of USCA312 containing only the first 50 cities.
USCA312数据集包含对象的类TSP在美国和加拿大的312个城市之间的距离。 USCA50是USCA312只包含50个城市的一个子集。

The USCA312_map dataset contains  spatial data of the 312 cities.
USCA312_map数据集包含了空间数据的312个城市。


用法----------Usage----------


data("USCA312")
data("USCA312_map")
data("USCA50")



格式----------Format----------

USCA312 and USCA50 are objects of class TSP. USCA312_map contains in USCA312_coords the spatial coordinates of the 312 cities and in USCA312_basemap a part of the  map of North America.
USCA312和USCA50是对象类TSP。 USCA312_map包含在USCA312_coords的空间坐标的312个城市,并在USCA312_basemap北美图的一部分。


Details

详细信息----------Details----------

For USCA312_map several packages for geographic data are needed (see Examples section).
USCA312_map几个包的GEO数据(见例一节)。

We want to thank Roger Bivand for his help with plotting the map.
我们要对他的帮助与感谢Bivand罗杰绘制的图。


源----------Source----------

John Burkardt, CITIES – City Distance Datasets,  http://www.csit.fsu.edu/~burkardt/datasets/cities/cities.html
约翰·Burkardt,城市 - 城市距离数据集,http://www.csit.fsu.edu/ burkardt /数据集/城市/ cities.html的


实例----------Examples----------


data("USCA312")
data("USCA312_map")

## calculate a tour[#计算旅游]
tour <- solve_TSP(USCA312)
tour

## load map tools[#加载图的工具。]
library("maps")
library("sp")
library("maptools")

## plot map[#图图]
plot(as(USCA312_coords, "Spatial"), axes=TRUE)
plot(USCA312_basemap, add=TRUE, col = "gray")


## plot tour and add cities[#图旅游,增加城市]
tour_line <- SpatialLines(list(Lines(list(
    Line(USCA312_coords[c(tour, tour[1]),])), ID="1")))

plot(tour_line, add=TRUE, col = "red")
points(USCA312_coords, pch=3, cex=0.4, col="black")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-13 11:51 , Processed in 0.027651 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表