I want to create a scatterplot that above certain x and y values has labeled points, and points with no labels below these values.
I was thinking about something like
plot(data[,2]~data[,3], ylim=rev(range(data[,2])), xlim=c(-20,20), log="y", type="n")
text(data[,2]~data[,3], labels=ifelse(data[,2] < 0.05 && data[,3] > 1, data[,1], points(y,x)))
but it gives me this error:
Error in ans[!test & ok] <- rep(no, length.out = length(ans))[!test & :
replacement has length zero
In addition: Warning message:
In rep(no, length.out = length(ans)) :
'x' is NULL so the result will be NULL
I found some similar questions here on SO, but nothing that could be adapted to my needs - at least with my limited knowledge.
(I am a newbie in R, so please bear with my question.)