R语言读取大数据data.table包fread函数

> setwd("D:\\R_Tardy")
> library(data.table)
//  data.table 1.9.6  
// For help type ?data.table or 
// https://github.com/Rdatatable/data.table/wikiThe fastest way to learn (by data.table authors): 
//  https://www.datacamp.com/courses/data-analysis-the-data-table-way
> TestDT <- fread("test.txt", sep = "\t",header = FALSE, na.strings = "NA") 

// 查看文件前几行
> head(TestDT)
//  重 命 名 列的名字
> colnames(TestDT) <- c("ID","num","desc")
> head(TestDT)
> df <- TestDT[TestDT$desc %in% c("Heat group"), 1:ncol(TestDT), with=FALSE]
> df1 <- data.frame(df)
> nrow(df1)

本文题目:R语言读取大数据data.table包fread函数
分享链接:http://lszwz.com/article/iiesih.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款