当前位置:网站首页>利用R语言读取csv文件入一个数据框,然后查看各列的属性。
利用R语言读取csv文件入一个数据框,然后查看各列的属性。
2022-07-30 08:21:00 【hnjzsyjyj】
【问题描述】
Load the data into a data frame.
Use an R command to check data type has been used for each column.
(利用R语言读取csv文件入一个数据框,然后查看各列的属性。)
【R语言代码】
> df <- read.csv("D:/body.csv")
> str(df)
'data.frame': 3741 obs. of 12 variables:
$ weight : num 15.8 17.9 23.5 16.8 15.3 18.3 13.7 13.8 19.8 19.2 ...
$ stature : int 1033 1039 1112 997 997 987 941 933 1164 1100 ...
$ head : int 498 506 512 489 473 513 507 490 529 524 ...
$ shoulder: int 282 273 309 253 273 279 249 251 296 284 ...
$ hand_l : int 120 121 121 116 114 114 101 109 125 123 ...
$ hand_w : int 55 56 59 51 51 55 52 50 59 56 ...
$ chest : int 526 564 601 532 501 558 503 502 553 563 ...
$ waist : int 475 498 520 491 465 503 459 461 507 535 ...
$ foot_l : int 163 163 171 163 167 164 150 150 175 172 ...
$ foot_w : int 67 67 65 61 64 66 61 61 69 65 ...
$ gender : Factor w/ 2 levels "F","M": 1 2 1 1 1 2 2 1 1 1 ...
$ age : int 50 51 53 46 41 44 40 43 66 62 ...
边栏推荐
猜你喜欢
随机推荐
【SQL server速成之路】——身份验证及建立和管理用户账户
信号完整性测试
浅论各种调试接口(JTAG、SWD、RDI、Jlink、Ulink、STlink)的区别
Liunx服务器安装SVN(安装包版)
Detailed description of iperf3 parameter options
How to implement Golang DES encryption and decryption?
hicp第六天
SEER数据库中“手术变量(RX SUMM-SURG OTH REG/DIS )”下的字段解释
leetcode-990:等式方程的可满足性
Excel xlsx file not supported两种解决办法【杭州多测师】【杭州多测师_王sir】
一文读懂二十种开关电源拓扑结构
js柯里化
电路分析:运放和三极管组成的恒流源电路
Webview中的超链接点击到外部浏览器打开
Judging from the Internet:
342 · 山谷序列
Flutter 环境变量配置和flutter doctor中的错误解决
sort函数使用cmp出错Line 22: Char 38: error: reference to non-static member function must be called
SwiftUI SQLite 教程之 构建App本地数据库实现创建、读取、更新和删除(教程含完成项目源码)
HashSet和LinkedHashSet
![ES报错处理-mapper [xx.xx] of different type, current_type [text], merged_type [keyword]](/img/48/064348ec4d7c2a4fa6ffe7a4778ced.png)







