→ Wush978: ?reformulate 01/20 18:55
→ Wush978: ?as.formula 01/20 18:55
→ Wush978: 以上是我知道的兩個關鍵字,希望有幫助 01/20 18:55
→ EricTao: 感謝,剛剛有在看as.formula但是不太確定 01/20 19:52
→ celestialgod: 我理解是類似這樣的東西... as. formula(paste(resp 01/21 12:36
→ celestialgod: onseName, paste(names(dataname[names(datname! =r 01/21 12:36
→ celestialgod: esponseName)]), sep='+'), sep='~' ) 01/21 12:36
→ celestialgod: 更正成names(dataname)[names(datname)! =responseN 01/21 12:37
→ celestialgod: ame]這樣才對 01/21 12:37
→ Wush978: reformulate(colnames(data_frame_obj)) 01/21 13:29
→ celestialgod: reformulate原來這樣用 學了一招!! 01/22 10:28
→ Wush978: 還有 ~ . 也可以all in 01/22 18:11
→ EricTao: 感謝~用reformulate達成 能直接用dataFrame太棒了0.0 01/27 16:49
→ EricTao: 不過我第一個column是ID,研究下怎麼把它拿掉 01/27 16:50
→ Wush978: tail(x, -1) 可以拿掉x 的第一個element 01/28 21:17
感謝,最後還是寫個介面來選擇變數。
output$chooser<-renderUI({
checkboxGroupInput("cocho","choose
covas",colnames(cova),selected=tail(colnames(cova),-1))
})
output$formula<-renderText({
as.character(reformulate(input$cocho,input$tr))
})
長這樣 http://ppt.cc/wauk
※ 編輯: EricTao (140.112.137.56), 02/02/2015 00:24:35