[R] paste ?

Troels Ring tring at mail1.stofanet.dk
Mon Apr 24 16:45:09 CEST 2000


As Peter helpfully pointed out mn was a vector, so here is the corrected 
version:
  bland <- function (x) #accepts two columns
{
mn <<- 0.5*(x[,1]+x[,2])
diff <- x[,1]-x[,2]
plot(mn,diff,pch=16,xlab="Mean",ylab="Difference",
main = "Bland Altman plot",
sub= paste("Mean = ",formatC(mean(diff),digits=3)))
abline(h=mean(diff),lty=2)
abline(h=mean(diff)+c(2,-2)*sqrt(var(diff)))

At 14:00 24-04-00, you wrote:
>Dear friends. I've made a very simple procedure to make Bland-Altman plots 
>and it works OK except for the inability to take a variate as argument in 
>annotation. I'm sure it is a very simple error, so if you have 5 seconds 
>please tell me.
>Best wishes
>Troels
>
>  bland <- function (x) #accepts two columns
>{
>mn <- 0.5*(x[,1]+x[,2])
>diff <- x[,1]-x[,2]
>plot(mn,diff,pch=16,xlab="Mean",ylab="Difference",
>main = paste("Bland Altman plot",mn))
>abline(h=mean(diff),lty=2)
>abline(h=mean(diff)+c(2,-2)*sqrt(var(diff)))
>}
>Troels
>
>look here:
>http://www.wired.com/wired/archive/8.04/joy.html
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Troels Ring, MD
Department of Nephrology
Aalborg Hospital, Denmark
tring at mail1.stofanet.dk 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list