合并一对多的数据

xiaoxiao2021-02-28  58

setwd("C:/Users/11565/Desktop/练习数据/数据预处理") #店铺淘宝店合并 s1 <- read.csv("s1.csv",header = T) s3 <- read.csv("s3.csv",header = T) dim(s1);dim(s3) s13 <- rbind(s1,s3) names(s3) st = merge(t13, s13, all=TRUE, sort=TRUE)  #淘宝商品合并 c1 <- read.csv("c1.csv",header = T) c3 <- read.csv("c2.csv",header = T) dim(c1);dim(c3) c13 <- rbind(c1,c3) sc13 = merge(s13, c13, all=TRUE, sort=TRUE)  dim(c13);dim(t13);dim(sc13) write.table(sc13, "sc13.csv", sep =",", row.names =FALSE, col.names =TRUE) sc_13 <- read.csv("sc13.csv") attach(sc_13) table(type)

转载请注明原文地址: https://www.6miu.com/read-2600031.html

最新回复(0)