#IAQI(PM2.5)=0-50-100-150-200-300-400-500---------
#PM2.5=0-35-75-115-150-250-350-500
PM25_IAQI=ifelse(
#IAQI=0-50
(PM25_24_48_72>=0 & PM25_24_48_72<35),(50-0)/(35-0)*(PM25_24_48_72-0)+0,
ifelse(
#IAQI=50-100
(PM25_24_48_72>=35 & PM25_24_48_72<75),(100-50)/(75-35)*(PM25_24_48_72-35)+50,
ifelse(
#IAQI=100-150
(PM25_24_48_72>=75 & PM25_24_48_72<115),(150-100)/(115-75)*(PM25_24_48_72-75)+100,
ifelse(
#IAQI=150-200
(PM25_24_48_72>=115 & PM25_24_48_72<150),(200-150)/(150-115)*(PM25_24_48_72-115)+150,
ifelse(
#IAQI=200-300
(PM25_24_48_72>=150 & PM25_24_48_72<250),(300-200)/(250-150)*(PM25_24_48_72-150)+200,
ifelse(
#IAQI=300-400
(PM25_24_48_72>=250 & PM25_24_48_72<350),(400-300)/(350-250)*(PM25_24_48_72-250)+300,
ifelse(
#IAQI=400-500
(PM25_24_48_72>=350 & PM25_24_48_72<500),(500-400)/(500-350)*(PM25_24_48_72-350)+400,
ifelse(
#IAQI>500
(PM25_24_48_72>=500),500,NA
)
)
)
)
)
)
)
)
网友评论