Skip to content
Prev 334560 / 398503 Next

Hello R user!

Here is a simple example (without the proportional size
bubbles--you've been given some references on that) using the lattice
package:

# one dataframe holds the data from both "sources" I call them.
# they would be data from your two separate dataframes,
# that you call graph1 and graph2
dd <- data.frame(x=rnorm(10), y=rnorm(10), source=sample(c("A","B"),
10, replace=TRUE))
dd
library(lattice)
xyplot(y~x | source, data=dd)
# or another way
xyplot(y~x, groups=source, data=dd,  auto.key=TRUE)

You'll want to think about how you are storing your data. Certain ways
of doing it lend themselves to certain ways of graphing. Some ways
make things difficult . . .

--Chris Ryan
On Tue, Dec 17, 2013 at 1:24 PM, Sarah Goslee <sarah.goslee at gmail.com> wrote: