R read.csv數據框


在學習讀入數據表格時要用到txr.talbe將csv文件轉化為數據框形式,特此查了一下
數據框是r中最常見的原始數據形式,類似於數據庫表或Excel數據表的形式
Data Frames
Description
The function data.frame() creates data frames, tightly coupled collections of variables which share many of the properties of matrices and of lists, used as the fundamental data structure by most of R's modeling software.

Usage
data.frame(..., row.names = NULL, check.rows = FALSE,
check.names = TRUE, fix.empty.names = TRUE,
stringsAsFactors = default.stringsAsFactors())
但實際上只是read.csv()函數以數據框的格式將csv導入r中創建的tax.tab,如下代碼

tax.tab <- read.csv("taxsamp.csv", header=TRUE, as.is=TRUE)
print(head(tax.tab))

read.csv()

Reads a file in table format and creates a data frame from it, with cases corresponding to lines and variables to fields in the file.

Assignment Operators <-

Assign a value to a name.

Usage
x <- value


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM