R read.csv数据框
Posted impw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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
以上是关于R read.csv数据框的主要内容,如果未能解决你的问题,请参考以下文章