看板 Statistics 關於我們 聯絡資訊
各位大大好 [軟體程式類別]: R [程式問題]: for 迴圈命名資料夾 [軟體熟悉度]: 熟悉 [問題敘述]: 我現在有一個large list 然後想把裡面的資料一一命名 像是 page1 <- myfiles[[1]] page2 <- myfiles[[2]] page3 <- myfiles[[3]] 因為有87個資料夾 一個一個跑也不是辦法.. 於是我用for迴圈去跑 但是一直無法出現我要的結果... 我的程式如下 for (i in c(1:87)){ assign("page"[i], myfiles[[i]]) } 請問是哪裡出了錯呢? 感謝 解決問題的大大我會給300P作為答謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 65.96.232.71 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1520652329.A.AAF.html
celestialgod: assign(paste0("page", i), myfiles[[i]]) 03/10 11:50
感恩大大!!! ※ 編輯: Lynnhan (65.96.232.71), 03/10/2018 12:04:58