Skip to Main Content
Spatial Point Patterns
book

Spatial Point Patterns

by Adrian Baddeley, Ege Rubak, Rolf Turner
November 2015
Intermediate to advanced content levelIntermediate to advanced
828 pages
33h 11m
English
Chapman and Hall/CRC
Content preview from Spatial Point Patterns
Collecting and Handling Point Pattern Data 69
Next we use the rgb command (f rom the standard grDevices package) to co nvert these numerical
values to the colour values r ecognised by R, which are character strings like "#96928F".
> mats <- rgb(arr[,,1], arr[,,2], arr[,,3])
> dim(mats) <- dim(arr)[1:2]
The matrix dimension s we re lost, so they are reinstated using dim<-. Finally we c onvert the matrix
of colour values to an image using im. To check the correct orientation and th e pixel aspect ratio,
we inspected the metadata for sandholes.jpg using the open source image editor GIMP.
> sand <- im(transmat(mats, "European", "spatstat"))
Since no other ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Visualization Analysis and Design

Visualization Analysis and Design

Tamara Munzner
R in Action, Third Edition

R in Action, Third Edition

Robert I. Kabacoff

Publisher Resources

ISBN: 9781482210217