[R] smoothScatter

From: Tom Hart <Tom.Hart_at_ioz.ac.uk>
Date: Fri, 14 Mar 2008 11:56:51 +0000


Hi, I have been trying to plot density plots using the example on:  

http://addictedtor.free.fr/graphiques/graphcode.php?graph=139  

I used to use this function, but I cannot get any old code or even the example to work.  

library("geneplotter")
require("RColorBrewer")

  x1  <- matrix(rnorm(1e4), ncol=2)
  x2  <- matrix(rnorm(1e4, mean=3, sd=1.5), ncol=2)
  x   <- rbind(x1,x2)

  layout(matrix(1:4, ncol=2, byrow=TRUE))   op <- par(mar=rep(2,4))
  smoothScatter(x, nrpoints=0)
  smoothScatter(x)
  smoothScatter(x, nrpoints=Inf,
                colramp=colorRampPalette(brewer.pal(9,"YlOrRd")),
                bandwidth=40)

  colors <- densCols(x)
  plot(x, col=colors, pch=20)
par(op)

But I can't even get the example to work. I have installed geneplotter and RColorBrewer, but I get the messages "

Error: could not find function "smoothScatter" Error: could not find function "densCols"

I thought it was something to do with the version of R, but I've now tried it in 2.0-2.6 and nothing works. Does anyone know how to install smoothScatter and densCols separately? Any ideas?
Cheers,
Tom

The Zoological Society of London is incorporated by Royal Charter Principal Office England. Company Number RC000749 Registered address:
Regent's Park, London, England NW1 4RY
Registered Charity in England and Wales no. 208728



This e-mail has been sent in confidence to the named add...{{dropped:20}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 14 Mar 2008 - 12:13:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Mar 2008 - 15:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive