hope this helps?
my output contains the results from a curvefit of 4 drug dose-response
curves
estimated logEC50 (drug potency) and R2 (quality of the fit) are
given:
output=data.frame(
drug=c('A','B','C','D'),
logEC50=c(-9.6, -9.4, -4.8, -8.3),
R2=c(0.99, 0.76, 0.22, 0.89))
to compare the drug potencies I would use:
ggplot(output, aes(drug, -logEC50)) +
opts(title='comparison of dug potencies') +
geom_point(size=4)
which plots all the data.
now I would like to include the R2 data to get a feeling for the
quality of the data:
ggplot(output, aes(drug, -logEC50, alpha=R2)) +
opts(title='comparison of dug potencies') +
geom_point(size=4)
I am however only interseted in 'high-quality' data (R2>0.6) and
woult like to 'stretch'
the whole alpha scale 'spanning' only the range 0.6 to 1 (and
everything below 0.6 should be
invisible)
so I try:
ggplot(output, aes(drug, -logEC50, alpha=R2)) +
opts(title='comparison of dug potencies') +
geom_point(size=4) +
scale_alpha(limits=c(0.6,1))
and I get this:
>Error in rgb(col[1, ], col[2, ], col[3, ], col[4, ]) :
>alpha level nan, not in [0,1]
how can I solve this?
your help is much appreciated!
R