Libraries:
library(ggplot2)
library(BlandAltmanLeh)
I am trying to use the Bland Altman Plot. This is the code:
pl<-bland.altman.plot(A,B, graph.sys = "ggplot2")
It works if I use numeric values for A and B. But if I fill in something like:
pl<-bland.altman.plot(dataset[,c(2)],dataset[,c(3)], graph.sys = "ggplot2")
it gives me the error:
Error in bland.altman.stats: group1 is not numeric.
Is there a way to use specific columns without defining the column name my workaround was:
A<-dataset$ABI_0L
However, I do not want to use column names but numbers! Is there a way to use the function without defining A and B first?