0
Вот функция prop.test:«аргумент» должен быть NULL или символ Вектор
baby.prop.test = function (x, n, p, conf.level = 0.95) {
# ...
return(prop.test(x,n,p,conf.level))
#baby.prop.test$statistic
}
# test case
baby.prop = baby.prop.test(72, 100, .7, conf.level=.99)
stopifnot(isTRUE(all.equal(as.numeric(baby.prop$statistic), .43643578)))
stopifnot(isTRUE(all.equal(as.numeric(baby.prop$p.value), .66252058)))
Здесь ошибка:
Error in match.arg(alternative) :
'arg' must be NULL or a character vector
Любая идея, что это не так?