[R] projecting onto 2d *integer* grid?

2009-05-16 Thread haettulegur
I have a bunch of data points in R^2 (Euclidean plane). But I want to project these onto a 2d integer grid -- that is, there's at most one data point for each integer (x, y) coordinate, and points near each other in the integer grid should also be near each other in the original R^2 space. Is ther

[R] help with two layers of factors

2009-04-02 Thread haettulegur
I have a data frame that looks something like... Column 1 is an experiment_id, Column 2 is the type of treatment ("control", "full treatment", or "partial treatment"), and Column 3 is a value. Experiment_id Treament_type Value 12345"control"3 12345"full treatment"4 12345"full

[R] help with ggplot2 -- ggpoint function missing?

2009-04-01 Thread haettulegur
I'm trying to follow the ggplot introduction here: http://had.co.nz/ggplot/ggplot-introduction.pdf I've installed ggplot2 with install.packages("ggplot2", dep=T) but when I try to run print(ggpoint(p, list(colour = sex))) I get an error: Error in print(ggpoint(p, list(colour = sex))) : could n