This is my code:
A<-read.delim("/Users/macbookair11/Downloads/file.txt",header = T)
names(A)
attach(A)
P<--log10(fdr)
plot(lfc,P,type="p",
xlab="log2fc",
ylab="-log10fdr",
pch=16,
xlim=c(-5,5)
)
abline(h =(-log10(0.01)), untf = FALSE, col="red")
abline(v =(log2(2)), untf = FALSE, col="red")
abline(v =-(log2(2)), untf = FALSE, col="red")
text(lfc,P, labels=Transcript, cex=0.6, pos=4, col="red")
I need to label not all the points, but only those ones which have y>2 and (x<-1 or x>1).
How can I change my script to make it work in a right way?