码迷,mamicode.com
首页 > 其他好文 > 详细

R read.csv数据框

时间:2020-05-31 21:29:21      阅读:58      评论:0      收藏:0      [点我收藏+]

标签:ons   var   mes   create   and   creates   read   des   prope   

在学习读入数据表格时要用到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数据框

标签:ons   var   mes   create   and   creates   read   des   prope   

原文地址:https://www.cnblogs.com/impw/p/13021536.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!