I'm have an issue with my analysis and would like to replace all of the 1's in a particular column with .9999, for example:
SNP Pvalue
rs11 0.6516
rs12 0.3开发者_如何学Go311
rs13 1.0000
would become
SNP Pvalue
rs11 0.6516
rs12 0.3311
rs13 0.9999
Thanks in advance for your replies.
Assuming your data.frame is called mydf:
mydf$Pvalue[mydf$Pvalue==1] <- 0.9999
See help('[<-')
or any number of introduction to R manuals such as this one:
http://cran.r-project.org/doc/manuals/R-intro.pdf
精彩评论