File: nc.Rout.save

package info (click to toggle)
r-cran-sp 1%3A0.9-66-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,696 kB
  • ctags: 123
  • sloc: ansic: 1,475; sh: 6; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 1,108 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1  (2005-06-20), ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

> # library(sp)
> # library(maptools)
> # data(ncshp)
> # nc1 <- as.SpatialPolygons.Shapes(nc.shp$Shapes, as.character(nc.shp$att.data$FIPS))
> # df <- nc.shp$att.data
> # rownames(df) <- as.character(nc.shp$att.data$FIPS)
> # identical(rownames(df), sapply(slot(nc1, "polygons"), function(i) slot(i, "ID")))
> # nc <- SpatialPolygonsDataFrame(nc1, df)
> # 
> # nc$X = factor(sample(1:5,100,replace=T),labels=letters[1:5])
> # nc$Y = factor(sample(1:5,100,replace=T),labels=letters[6:10])
> # spplot(nc, c("X","Y"))
>