Download S-PLUS 7 Enterprise Developer User's Guide
Transcript
Chapter 6 Modeling Large Data Sets
3. Select the columns to determine the data you want to appear
in the histogram and assign them to the data frame
cluster.psbu.df.
cluster.psub.df <- bd.coerce(
bd.select.rows(x=cluster.p.bd,
columns=c("Lat","Lon","PREDICT.membership")) )
4. Optionally, you can view this three-column data set in the
data viewer. Observe that it still has 32,165 rows.
bd.data.viewer(cluster.psub.df)
5. Create a vector to contain the data set’s latitudes.
Lat.vec <- cluster.psub.df$Lat
6. Create a vector to contain the data set’s longitudes.
Lon.vec <- cluster.psub.df$Lon
7.
Create a character vector to contain the data set’s predicted
membership.
Memb.vec <as.character(cluster.psub.df$PREDICT.membership )
8. Create a vector of the column PREDICT.membership.
Memb.vec <- cluster.p.bd$PREDICT.membership
Creating a Multi- In the following exercise, use the data you sorted and filtered in the
previous exercise to create a multi-tabbed sheet, one for each of the
tabbed Sheet
first 20 clusters of your 40-cluster set.
Each sheet shows black dots for all but that sheet’s salient cluster,
which is superimposed with the color assigned for that sheet.
To create the multi-tabbed histogram sheet
1. Set the vector to 1:NK, where NK is the cluster number.
Kvec=1:NK
2. Set up and name the histogram.
graph.setup(Name="USA")
178