Consider the following data frames:
x1 <- matrix(c(100,200,300,500),ncol=1,dimnames=list(LETTERS[1:4],"x"))
y1 <- matrix(c(75,100,300,400),ncol=1,dimnames=list(LETTERS[1:4],"y"))
datamichael <- data.frame(x1,y1)
x2 <- matrix(c(200,50,200,600),ncol=1,dimnames=list(LETTERS[1:4],"x"))
y2 <- matrix(c(100,100,400,300),ncol=1,dimnames=list(LETTERS[1:4],"y"))
dataewan <- data.frame(x2,y2)
x3 <- matrix(c(100,150,400,200),ncol=1,dimnames=list(LETTERS[1:4],"x"))
y3 <- matrix(c(100,100,400,300),ncol=1,dimnames=list(LETTERS[1:4],"y"))
datatom <- data.frame(x3,y3)
I have merged these three data.frame by:
datamichaeldataewan <- rbind(datamichael,dataewan)
datamichaeldatatom <- rbind(datamichael,datatom)
By using the package Benchmarking I want to make the following calculation:
library(Benchmarking)
effmichaelewan <- dea(data.frame(datamichaeldataewan[1]),
data.frame(datamichaeldataewan[2]),
RTS="crs", ORIENTATION="out",
XREF=datamichael$x1, YREF=datamichael$y1)
effmichaeltom <- dea(data.frame(datamichaeldatatom[1]),
data.frame(datamichaeldatatom[2]),
RTS="crs", ORIENTATION="out",
XREF=datamichael$x1, YREF=datamichael$y1)
The problem in my case is that I have a lot more than two merged data.frame. So is it possible to make the calculation above by using a loop? The important is that the name of the output variable is "eff[name-after-first-data][name-after-second-data]". And that: datamichaeldataewan change within each calculation:
dea(data.frame(datamichaeldataewan[1]),
data.frame(datamichaeldataewan[2]),
RTS="crs", ORIENTATION="out",
XREF=datamichael$x1, YREF=datamichael$y1)