知识库 : HR数据处理(R)

Edit Document

data <-  read.csv("d:/hr_new.csv",fileEncoding="UTF-8")

temp <- strsplit(as.character(data$TARGET_JOB),split = "、");

 

t <- function(tt){

  return(tt[1]);

};

te <- lapply(temp,t);

te <- as.character(te);

data$job <- te;

temp <- strsplit(as.character(data$Target_WORKPLACE),split = "、");

data <-  read.csv("d:/hr_new.csv",fileEncoding="UTF-8")

temp <- strsplit(as.character(data$TARGET_JOB),split = "、");

t <- function(tt){

  return(tt[1]);

};

 

te <- lapply(temp,t);

te <- as.character(te);

data$job <- te;

temp <- strsplit(as.character(data$TARGET_WORKPLACE),split = "、");

te <- lapply(temp,t);

te <- as.character(te);

data$place <- te;

data <- data[,c(1,3,5,6)];

data <- data[data$place == "北京",];

data$TARGET_SALARY <- as.character(data$TARGET_SALARY);

data <- data[data$TARGET_SALARY != "不 位月薪范 ",];

result <- aggregate(data$HKEY,by = list("job" = data$job,"salary" = data$TARGET_SALARY),length);

result<- result[order(result$x,decreasing = TRUE),];

colnames(result) <- c(" 位","薪 水平"," 量");

result;

Attachments:

HR数据处理(R).docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document)