导出文件 library(tidyverse)
library(readxl)
wp0 <- read_excel("wp.xlsx", sheet = "wp0")
wp1 <- read_excel("wp.xlsx", sheet = "wp1")
#-----------------------------板块------------------------------------
wp0 %>% count()
df0 <-wp0 %>% count(`板块名称`)
names(df0)[names(df0) == 'n'] <- 'n0'
wp1 %>% count()
df1 <-wp1 %>% count(`板块名称`)
df2 <-wp1 %>% count(`板块名称`,`租赁来源`) %>% pivot_wider( names_from = "租赁来源", values_from = "n")
df3 <-wp1 %>% count(`板块名称`,`租赁方式`)%>% pivot_wider( names_from = "租赁方式", values_from = "n")
df4 <-wp1 %