2016-04-04 46 views
-1

İşte benim kod bir tablo yapmaya çalışıyor:R doğrusal modelden log

table <- data.frame(expand.grid(
    health = factor(c("support", "oppose"), levels = c("support", "oppose")), + 
    information = factor(c("support", "oppose"), levels = c("support", "oppose")), + 
    gender = factor(c("male", "female"), levels = c("support", "oppose")), 
        count = c(76, 160, 6, 25, 114, 181, 11, 48))) 

R unexpected '=' after info söylüyor. profesörüm sınıfta bunun gibi bir örnek yaptı ve onun kodu işe yaradı. Ben

cevap

0

+ s çıkarın verilerin bir günlük doğrusal modelini yapmaya çalışıyorum:

table<- data.frame(expand.grid(health=factor(c("support", "oppose"), 
levels=c("support", "oppose")), information = factor(c("support", 
"oppose"), levels=c("support", "oppose")), gender = factor(c("male", 
"female"), levels=c("support", "oppose")), count=c(76, 160, 6, 25, 114, 
181, 11, 48))) 

Onlar R konsolunda kod yankı yapıştırarak/kopyasından olasıdır, ancak size sözdizimi olsun hatalar.