Contact me:

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

posted @ 2020-05-31 21:11  impwa  阅读(1402)  评论(0编辑  收藏  举报