- Hands-On Geospatial Analysis with R and QGIS
- Shammunul Islam
- 54字
- 2021-06-10 18:44:24
Looping in R
Suppose we want to loop through all the values of the aug_price column inside all_prices4 and square them and return them. We can do so in the following way:
jan = all_prices4$jan_price
for(price in jan){
print(price^2)
}
This prints a square of all the prices in January as follows:

推薦閱讀
- 大數(shù)據(jù)導(dǎo)論:思維、技術(shù)與應(yīng)用
- 現(xiàn)代測(cè)控電子技術(shù)
- 3D Printing with RepRap Cookbook
- 人工免疫算法改進(jìn)及其應(yīng)用
- IoT Penetration Testing Cookbook
- PyTorch Deep Learning Hands-On
- Cloudera Administration Handbook
- 自動(dòng)控制理論(非自動(dòng)化專業(yè))
- Moodle Course Design Best Practices
- 嵌入式操作系統(tǒng)
- Excel 2007技巧大全
- Windows Server 2008 R2活動(dòng)目錄內(nèi)幕
- 網(wǎng)絡(luò)管理工具實(shí)用詳解
- Building a BeagleBone Black Super Cluster
- Linux系統(tǒng)下C程序開(kāi)發(fā)詳解