先介紹foreach. foreach用法就如同for迴圈,因此非常容易入手. 程式碼:. library(foreach) x = foreach (i = 1:3) %do% { sqrt(i) }
確定! 回上一頁