Mori/Codetest: Difference between revisions

From Opasnet
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 62: Line 62:
<rcode>
<rcode>
library(xtable)
library(xtable)
library(OpasnetUtils)
var1 <- data.frame(c = c("A", "A", "C"), d = c("D", "E", "E"), Result = 4:6)
var1 <- data.frame(c = c("A", "A", "C"), d = c("D", "E", "E"), Result = 4:6)
var2 <- var1
var2 <- var1
Line 73: Line 74:
print(xtable(out[[2]]), type = 'html')
print(xtable(out[[2]]), type = 'html')


library(OpasnetUtils)
data <- tidy(op_baseGetData("opasnet_base", "Op_en5466"), direction = "wide")
data <- tidy(op_baseGetData("opasnet_base", "Op_en5466"), direction = "wide")
data <- data[colnames(data) != "Unit"]
data <- data[colnames(data) != "Unit"]

Revision as of 08:42, 28 June 2012

Old R-code

+ Show code


Test code

+ Show code

⇤--#: . Why does the var2 outcome show row 3 OptB A E 50, because the decision should be applied only for row 1 OptB A D 4 ? There is a bug somewhere. --Jouni 16:12, 16 May 2012 (EEST) (type: truth; paradigms: science: attack)

New R-code