With this code:
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point()
p + geom_point() + geom_text(aes(wt, mpg, label=row.names(mtcars)))
>
You can pass a subset argument to a layer. In your case this would require having the rownames as a column, so they are evaluated properly. You will need to explicitly load plyr to get the function . which makes the syntax easy.
# shamelessly using @marius initial code
library(ggplot2)
library(plyr)
mtcars$name <- row.names(mtcars)
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point() + geom_text(aes(wt,mpg,label=name), subset = .(wt > 4 | mpg > 25))