# - - - - - - - - - - - - - - - # # add fama french 48 industry number and name of industry # base off of Ed deHaan's SAS Code that does the same # see: http://faculty.washington.edu/edehaan/pages/Programming/industries_ff48 # modifed by: Jeff L. McMullin on 18-DEC-2020 # Use at your own risk. No warranties implied. # - - - - - - - - - - - - - - - # temp<-dataframe_with_SIC4 temp$FF_IND_48_num = 48 temp$FF_IND_48_name = 'OTHER' # 1 Agric Agriculture,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0100) & (temp$SIC4 <= 0199),'AGRIC',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0200) & (temp$SIC4 <= 0299),'AGRIC',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0700) & (temp$SIC4 <= 0799),'AGRIC',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0910) & (temp$SIC4 <= 0919),'AGRIC',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2048) & (temp$SIC4 <= 2048),'AGRIC',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'AGRIC',1,temp$FF_IND_48_num) # 2 Food Food Products,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2000) & (temp$SIC4 <= 2009),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2010) & (temp$SIC4 <= 2019),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2020) & (temp$SIC4 <= 2029),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2030) & (temp$SIC4 <= 2039),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2040) & (temp$SIC4 <= 2046),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2050) & (temp$SIC4 <= 2059),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2060) & (temp$SIC4 <= 2063),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2070) & (temp$SIC4 <= 2079),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2090) & (temp$SIC4 <= 2092),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2095) & (temp$SIC4 <= 2095),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2098) & (temp$SIC4 <= 2099),'FOOD',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'FOOD',2,temp$FF_IND_48_num) # 3 Soda Candy & Soda,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2064) & (temp$SIC4 <= 2068),'SODA',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2086) & (temp$SIC4 <= 2086),'SODA',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2087) & (temp$SIC4 <= 2087),'SODA',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2096) & (temp$SIC4 <= 2096),'SODA',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2097) & (temp$SIC4 <= 2097),'SODA',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'SODA',3,temp$FF_IND_48_num) # 4 Beer Beer & Liquor,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2080) & (temp$SIC4 <= 2080),'BEER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2082) & (temp$SIC4 <= 2082),'BEER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2083) & (temp$SIC4 <= 2083),'BEER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2084) & (temp$SIC4 <= 2084),'BEER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2085) & (temp$SIC4 <= 2085),'BEER',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BEER',4,temp$FF_IND_48_num) # 5 Smoke Tobacco Products,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2100) & (temp$SIC4 <= 2199),'SMOKE',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'SMOKE',5,temp$FF_IND_48_num) # 6 Toys Recreation,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0920) & (temp$SIC4 <= 0999),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3650) & (temp$SIC4 <= 3651),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3652) & (temp$SIC4 <= 3652),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3732) & (temp$SIC4 <= 3732 ),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3930) & (temp$SIC4 <= 3931 ),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3940) & (temp$SIC4 <= 3949 ),'TOYS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'TOYS',6,temp$FF_IND_48_num) # 7 Fun Entertainment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7800) & (temp$SIC4 <= 7829 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7830) & (temp$SIC4 <= 7833 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7840) & (temp$SIC4 <= 7841 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7900) & (temp$SIC4 <= 7900 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7910) & (temp$SIC4 <= 7911 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7920) & (temp$SIC4 <= 7929 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7930) & (temp$SIC4 <= 7933 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7940) & (temp$SIC4 <= 7949 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7980) & (temp$SIC4 <= 7980 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7990) & (temp$SIC4 <= 7999 ),'FUN',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'FUN',7,temp$FF_IND_48_num) # 8 Books Printing and Publishing,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2700) & (temp$SIC4 <= 2709 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2710) & (temp$SIC4 <= 2719 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2720) & (temp$SIC4 <= 2729 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2730) & (temp$SIC4 <= 2739 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2740) & (temp$SIC4 <= 2749 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2770) & (temp$SIC4 <= 2771 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2780) & (temp$SIC4 <= 2789 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2790) & (temp$SIC4 <= 2799 ),'BOOKS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BOOKS',8,temp$FF_IND_48_num) # 9 Hshld Consumer Goods,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2047) & (temp$SIC4 <= 2047 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2391) & (temp$SIC4 <= 2392 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2510) & (temp$SIC4 <= 2519 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2590) & (temp$SIC4 <= 2599 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2840) & (temp$SIC4 <= 2843 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2844) & (temp$SIC4 <= 2844 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3160) & (temp$SIC4 <= 3161 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3170) & (temp$SIC4 <= 3171 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3172) & (temp$SIC4 <= 3172 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3190) & (temp$SIC4 <= 3199 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3229) & (temp$SIC4 <= 3229 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3260) & (temp$SIC4 <= 3260 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3262) & (temp$SIC4 <= 3263 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3269) & (temp$SIC4 <= 3269 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3230) & (temp$SIC4 <= 3231 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3630) & (temp$SIC4 <= 3639 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3750) & (temp$SIC4 <= 3751 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3800) & (temp$SIC4 <= 3800 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3860) & (temp$SIC4 <= 3861 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3870) & (temp$SIC4 <= 3873 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3910) & (temp$SIC4 <= 3911 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3914) & (temp$SIC4 <= 3914 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3915) & (temp$SIC4 <= 3915 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3960) & (temp$SIC4 <= 3962 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3991) & (temp$SIC4 <= 3991 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3995) & (temp$SIC4 <= 3995 ),'HSHLD',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'HSHLD',9,temp$FF_IND_48_num) #10 Clths Apparel,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2300) & (temp$SIC4 <= 2390 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3020) & (temp$SIC4 <= 3021 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3100) & (temp$SIC4 <= 3111 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3130) & (temp$SIC4 <= 3131 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3140) & (temp$SIC4 <= 3149 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3150) & (temp$SIC4 <= 3151 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3963) & (temp$SIC4 <= 3965 ),'CLTHS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'CLTHS',10,temp$FF_IND_48_num) #11 Hlth Healthcare,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8000) & (temp$SIC4 <= 8099 ),'HLTH',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'HLTH',11,temp$FF_IND_48_num) #12 MedEq Medical Equipment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3693) & (temp$SIC4 <= 3693 ),'MEDEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3840) & (temp$SIC4 <= 3849 ),'MEDEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3850) & (temp$SIC4 <= 3851 ),'MEDEQ',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'MEDEQ',12,temp$FF_IND_48_num) #13 Drugs Pharmaceutical Products,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2830) & (temp$SIC4 <= 2830 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2831) & (temp$SIC4 <= 2831 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2833) & (temp$SIC4 <= 2833 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2834) & (temp$SIC4 <= 2834 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2835) & (temp$SIC4 <= 2835 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2836) & (temp$SIC4 <= 2836 ),'DRUGS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'DRUGS',13,temp$FF_IND_48_num) #14 Chems Chemicals,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2800) & (temp$SIC4 <= 2809 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2810) & (temp$SIC4 <= 2819 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2820) & (temp$SIC4 <= 2829 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2850) & (temp$SIC4 <= 2859 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2860) & (temp$SIC4 <= 2869 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2870) & (temp$SIC4 <= 2879 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2890) & (temp$SIC4 <= 2899 ),'CHEM',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'CHEM',14,temp$FF_IND_48_num) #15 Rubbr Rubber and Plastic Products,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3031) & (temp$SIC4 <= 3031 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3041) & (temp$SIC4 <= 3041 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3050) & (temp$SIC4 <= 3053 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3060) & (temp$SIC4 <= 3069 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3070) & (temp$SIC4 <= 3079 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3080) & (temp$SIC4 <= 3089 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3090) & (temp$SIC4 <= 3099 ),'RUBBR',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'RUBBR',15,temp$FF_IND_48_num) #16 Txtls Textiles,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2200) & (temp$SIC4 <= 2269 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2270) & (temp$SIC4 <= 2279 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2280) & (temp$SIC4 <= 2284 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2290) & (temp$SIC4 <= 2295 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2297) & (temp$SIC4 <= 2297 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2298) & (temp$SIC4 <= 2298 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2299) & (temp$SIC4 <= 2299 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2393) & (temp$SIC4 <= 2395 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2397) & (temp$SIC4 <= 2399 ),'TXTLS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'TXTLS',16,temp$FF_IND_48_num) #17 BldMt Construction Materials,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 0800) & (temp$SIC4 <= 0899 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2400) & (temp$SIC4 <= 2439 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2450) & (temp$SIC4 <= 2459 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2490) & (temp$SIC4 <= 2499 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2660) & (temp$SIC4 <= 2661 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2950) & (temp$SIC4 <= 2952 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3200) & (temp$SIC4 <= 3200 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3210) & (temp$SIC4 <= 3211 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3240) & (temp$SIC4 <= 3241 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3250) & (temp$SIC4 <= 3259 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3261) & (temp$SIC4 <= 3261 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3264) & (temp$SIC4 <= 3264 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3270) & (temp$SIC4 <= 3275 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3280) & (temp$SIC4 <= 3281 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3290) & (temp$SIC4 <= 3293 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3295) & (temp$SIC4 <= 3299 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3420) & (temp$SIC4 <= 3429 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3430) & (temp$SIC4 <= 3433 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3440) & (temp$SIC4 <= 3441 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3442) & (temp$SIC4 <= 3442 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3446) & (temp$SIC4 <= 3446 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3448) & (temp$SIC4 <= 3448 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3449) & (temp$SIC4 <= 3449 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3450) & (temp$SIC4 <= 3451 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3452) & (temp$SIC4 <= 3452 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3490) & (temp$SIC4 <= 3499 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3996) & (temp$SIC4 <= 3996 ),'BLDMT',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BLDMT',17,temp$FF_IND_48_num) #18 Cnstr Construction,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1500) & (temp$SIC4 <= 1511 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1520) & (temp$SIC4 <= 1529 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1530) & (temp$SIC4 <= 1539 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1540) & (temp$SIC4 <= 1549 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1600) & (temp$SIC4 <= 1699 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1700) & (temp$SIC4 <= 1799 ),'CNSTR',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'CNSTR',18,temp$FF_IND_48_num) #19 Steel Steel Works Etc,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3300) & (temp$SIC4 <= 3300 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3310) & (temp$SIC4 <= 3317 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3320) & (temp$SIC4 <= 3325 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3330) & (temp$SIC4 <= 3339 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3340) & (temp$SIC4 <= 3341 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3350) & (temp$SIC4 <= 3357 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3360) & (temp$SIC4 <= 3369 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3370) & (temp$SIC4 <= 3379 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3390) & (temp$SIC4 <= 3399 ),'STEEL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'STEEL',19,temp$FF_IND_48_num) #20 FabPr Fabricated Products,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3400) & (temp$SIC4 <= 3400 ),'FABPR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3443) & (temp$SIC4 <= 3443 ),'FABPR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3444) & (temp$SIC4 <= 3444 ),'FABPR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3460) & (temp$SIC4 <= 3469 ),'FABPR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3470) & (temp$SIC4 <= 3479 ),'FABPR',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'FABPR',20,temp$FF_IND_48_num) #21 Mach Machinery,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3510) & (temp$SIC4 <= 3519 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3520) & (temp$SIC4 <= 3529 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3530) & (temp$SIC4 <= 3530 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3531) & (temp$SIC4 <= 3531 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3532) & (temp$SIC4 <= 3532 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3533) & (temp$SIC4 <= 3533 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3534) & (temp$SIC4 <= 3534 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3535) & (temp$SIC4 <= 3535 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3536) & (temp$SIC4 <= 3536 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3538) & (temp$SIC4 <= 3538 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3540) & (temp$SIC4 <= 3549 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3550) & (temp$SIC4 <= 3559 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3560) & (temp$SIC4 <= 3569 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3580) & (temp$SIC4 <= 3580 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3581) & (temp$SIC4 <= 3581 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3582) & (temp$SIC4 <= 3582 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3585) & (temp$SIC4 <= 3585 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3586) & (temp$SIC4 <= 3586 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3589) & (temp$SIC4 <= 3589 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3590) & (temp$SIC4 <= 3599 ),'MACH',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'MACH',21,temp$FF_IND_48_num) #22 ElcEq Electrical Equipment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3600) & (temp$SIC4 <= 3600 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3610) & (temp$SIC4 <= 3613 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3620) & (temp$SIC4 <= 3621 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3623) & (temp$SIC4 <= 3629 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3640) & (temp$SIC4 <= 3644 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3645) & (temp$SIC4 <= 3645 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3646) & (temp$SIC4 <= 3646 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3648) & (temp$SIC4 <= 3649 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3660) & (temp$SIC4 <= 3660 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3690) & (temp$SIC4 <= 3690 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3691) & (temp$SIC4 <= 3692 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3699) & (temp$SIC4 <= 3699 ),'ELCEQ',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'ELCEQ',22,temp$FF_IND_48_num) #23 Autos Automobiles and Trucks,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2296) & (temp$SIC4 <= 2296 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2396) & (temp$SIC4 <= 2396 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3010) & (temp$SIC4 <= 3011 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3537) & (temp$SIC4 <= 3537 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3647) & (temp$SIC4 <= 3647 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3694) & (temp$SIC4 <= 3694 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3700) & (temp$SIC4 <= 3700 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3710) & (temp$SIC4 <= 3710 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3711) & (temp$SIC4 <= 3711 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3713) & (temp$SIC4 <= 3713 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3714) & (temp$SIC4 <= 3714 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3715) & (temp$SIC4 <= 3715 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3716) & (temp$SIC4 <= 3716 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3792) & (temp$SIC4 <= 3792 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3790) & (temp$SIC4 <= 3791 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3799) & (temp$SIC4 <= 3799 ),'AUTOS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'AUTOS',23,temp$FF_IND_48_num) #24 Aero Aircraft,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3720) & (temp$SIC4 <= 3720 ),'AERO',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3721) & (temp$SIC4 <= 3721 ),'AERO',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3723) & (temp$SIC4 <= 3724 ),'AERO',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3725) & (temp$SIC4 <= 3725 ),'AERO',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3728) & (temp$SIC4 <= 3729 ),'AERO',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'AERO',24,temp$FF_IND_48_num) #25 Ships Shipbuilding, Railroad Equipment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3730) & (temp$SIC4 <= 3731 ),'SHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3740) & (temp$SIC4 <= 3743 ),'SHIPS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'SHIPS',25,temp$FF_IND_48_num) #26 Guns Defense,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3760) & (temp$SIC4 <= 3769 ),'GUNS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3795) & (temp$SIC4 <= 3795 ),'GUNS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3480) & (temp$SIC4 <= 3489 ),'GUNS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'GUNS',26,temp$FF_IND_48_num) #27 Gold Precious Metals,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1040) & (temp$SIC4 <= 1049 ),'GOLD',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'GOLD',27,temp$FF_IND_48_num) #28 Mines Non) & (temp$SIC4 <= Metallic and Industrial Metal Mining,temp$FF_IND_48_num),temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1000) & (temp$SIC4 <= 1009 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1010) & (temp$SIC4 <= 1019 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1020) & (temp$SIC4 <= 1029 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1030) & (temp$SIC4 <= 1039 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1050) & (temp$SIC4 <= 1059 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1060) & (temp$SIC4 <= 1069 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1070) & (temp$SIC4 <= 1079 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1080) & (temp$SIC4 <= 1089 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1090) & (temp$SIC4 <= 1099 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1100) & (temp$SIC4 <= 1119 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1400) & (temp$SIC4 <= 1499 ),'MINES',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'MINES',28,temp$FF_IND_48_num) #29 Coal Coal,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1200) & (temp$SIC4 <= 1299 ),'COAL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'COAL',29,temp$FF_IND_48_num) #30 Oil Petroleum and Natural Gas,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1300) & (temp$SIC4 <= 1300 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1310) & (temp$SIC4 <= 1319 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1320) & (temp$SIC4 <= 1329 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1330) & (temp$SIC4 <= 1339 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1370) & (temp$SIC4 <= 1379 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1380) & (temp$SIC4 <= 1380 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1381) & (temp$SIC4 <= 1381 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1382) & (temp$SIC4 <= 1382 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 1389) & (temp$SIC4 <= 1389 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2900) & (temp$SIC4 <= 2912 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2990) & (temp$SIC4 <= 2999 ),'OIL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'OIL',30,temp$FF_IND_48_num) #31 Util Utilities,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4900) & (temp$SIC4 <= 4900 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4910) & (temp$SIC4 <= 4911 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4920) & (temp$SIC4 <= 4922 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4923) & (temp$SIC4 <= 4923 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4924) & (temp$SIC4 <= 4925 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4930) & (temp$SIC4 <= 4931 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4932) & (temp$SIC4 <= 4932 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4939) & (temp$SIC4 <= 4939 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4940) & (temp$SIC4 <= 4942 ),'UTIL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'UTIL',31,temp$FF_IND_48_num) #32 Telcm Communication,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4800) & (temp$SIC4 <= 4800 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4810) & (temp$SIC4 <= 4813 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4820) & (temp$SIC4 <= 4822 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4830) & (temp$SIC4 <= 4839 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4840) & (temp$SIC4 <= 4841 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4880) & (temp$SIC4 <= 4889 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4890) & (temp$SIC4 <= 4890 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4891) & (temp$SIC4 <= 4891 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4892) & (temp$SIC4 <= 4892 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4899) & (temp$SIC4 <= 4899 ),'TELCM',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'TELCM',32,temp$FF_IND_48_num) #33 PerSv Personal Services,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7020) & (temp$SIC4 <= 7021 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7030) & (temp$SIC4 <= 7033 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7200) & (temp$SIC4 <= 7200 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7210) & (temp$SIC4 <= 7212 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7214) & (temp$SIC4 <= 7214 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7215) & (temp$SIC4 <= 7216 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7217) & (temp$SIC4 <= 7217 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7219) & (temp$SIC4 <= 7219 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7220) & (temp$SIC4 <= 7221 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7230) & (temp$SIC4 <= 7231 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7240) & (temp$SIC4 <= 7241 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7250) & (temp$SIC4 <= 7251 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7260) & (temp$SIC4 <= 7269 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7270) & (temp$SIC4 <= 7290 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7291) & (temp$SIC4 <= 7291 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7292) & (temp$SIC4 <= 7299 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7395) & (temp$SIC4 <= 7395 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7500) & (temp$SIC4 <= 7500 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7520) & (temp$SIC4 <= 7529 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7530) & (temp$SIC4 <= 7539 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7540) & (temp$SIC4 <= 7549 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7600) & (temp$SIC4 <= 7600 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7620) & (temp$SIC4 <= 7620 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7622) & (temp$SIC4 <= 7622 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7623) & (temp$SIC4 <= 7623 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7629) & (temp$SIC4 <= 7629 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7630) & (temp$SIC4 <= 7631 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7640) & (temp$SIC4 <= 7641 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7690) & (temp$SIC4 <= 7699 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8100) & (temp$SIC4 <= 8199 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8200) & (temp$SIC4 <= 8299 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8300) & (temp$SIC4 <= 8399 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8400) & (temp$SIC4 <= 8499 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8600) & (temp$SIC4 <= 8699 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8800) & (temp$SIC4 <= 8899 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7510) & (temp$SIC4 <= 7515 ),'PERSV',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'PERSV',33,temp$FF_IND_48_num) #34 BusSv Business Services,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2750) & (temp$SIC4 <= 2759 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3993) & (temp$SIC4 <= 3993 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7218) & (temp$SIC4 <= 7218 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7300) & (temp$SIC4 <= 7300 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7310) & (temp$SIC4 <= 7319 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7320) & (temp$SIC4 <= 7329 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7330) & (temp$SIC4 <= 7339 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7340) & (temp$SIC4 <= 7342 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7349) & (temp$SIC4 <= 7349 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7350) & (temp$SIC4 <= 7351 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7352) & (temp$SIC4 <= 7352 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7353) & (temp$SIC4 <= 7353 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7359) & (temp$SIC4 <= 7359 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7360) & (temp$SIC4 <= 7369 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7370) & (temp$SIC4 <= 7372 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7374) & (temp$SIC4 <= 7374 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7375) & (temp$SIC4 <= 7375 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7376) & (temp$SIC4 <= 7376 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7377) & (temp$SIC4 <= 7377 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7378) & (temp$SIC4 <= 7378 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7379) & (temp$SIC4 <= 7379 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7380) & (temp$SIC4 <= 7380 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7381) & (temp$SIC4 <= 7382 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7383) & (temp$SIC4 <= 7383 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7384) & (temp$SIC4 <= 7384 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7385) & (temp$SIC4 <= 7385 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7389) & (temp$SIC4 <= 7390 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7391) & (temp$SIC4 <= 7391 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7392) & (temp$SIC4 <= 7392 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7393) & (temp$SIC4 <= 7393 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7394) & (temp$SIC4 <= 7394 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7396) & (temp$SIC4 <= 7396 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7397) & (temp$SIC4 <= 7397 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7399) & (temp$SIC4 <= 7399 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7519) & (temp$SIC4 <= 7519 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8700) & (temp$SIC4 <= 8700 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8710) & (temp$SIC4 <= 8713 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8720) & (temp$SIC4 <= 8721 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8730) & (temp$SIC4 <= 8734 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8740) & (temp$SIC4 <= 8748 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8900) & (temp$SIC4 <= 8910 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8911) & (temp$SIC4 <= 8911 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 8920) & (temp$SIC4 <= 8999 ),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4220) & (temp$SIC4 <= 4229),'BUSSV',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BUSSV',34,temp$FF_IND_48_num) #35 Comps Computers,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3570) & (temp$SIC4 <= 3579 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3680) & (temp$SIC4 <= 3680 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3681) & (temp$SIC4 <= 3681 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3682) & (temp$SIC4 <= 3682 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3683) & (temp$SIC4 <= 3683 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3684) & (temp$SIC4 <= 3684 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3685) & (temp$SIC4 <= 3685 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3686) & (temp$SIC4 <= 3686 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3687) & (temp$SIC4 <= 3687 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3688) & (temp$SIC4 <= 3688 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3689) & (temp$SIC4 <= 3689 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3695) & (temp$SIC4 <= 3695 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7373) & (temp$SIC4 <= 7373 ),'COMPS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'COMPS',35,temp$FF_IND_48_num) #36 Chips Electronic Equipment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3622) & (temp$SIC4 <= 3622 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3661) & (temp$SIC4 <= 3661 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3662) & (temp$SIC4 <= 3662 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3663) & (temp$SIC4 <= 3663 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3664) & (temp$SIC4 <= 3664 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3665) & (temp$SIC4 <= 3665 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3666) & (temp$SIC4 <= 3666 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3669) & (temp$SIC4 <= 3669 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3670) & (temp$SIC4 <= 3679 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3810) & (temp$SIC4 <= 3810 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3812) & (temp$SIC4 <= 3812 ),'CHIPS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'CHIPS',36,temp$FF_IND_48_num) #37 LabEq Measuring and Control Equipment,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3811) & (temp$SIC4 <= 3811 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3820) & (temp$SIC4 <= 3820 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3821) & (temp$SIC4 <= 3821 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3822) & (temp$SIC4 <= 3822 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3823) & (temp$SIC4 <= 3823 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3824) & (temp$SIC4 <= 3824 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3825) & (temp$SIC4 <= 3825 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3826) & (temp$SIC4 <= 3826 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3827) & (temp$SIC4 <= 3827 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3829) & (temp$SIC4 <= 3829 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3830) & (temp$SIC4 <= 3839 ),'LABEQ',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'LABEQ',37,temp$FF_IND_48_num) #38 Paper Business Supplies,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2520) & (temp$SIC4 <= 2549 ),'PAPER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2600) & (temp$SIC4 <= 2639 ),'PAPER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2670) & (temp$SIC4 <= 2699 ),'PAPER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2760) & (temp$SIC4 <= 2761 ),'PAPER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3950) & (temp$SIC4 <= 3955 ),'PAPER',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'PAPER',38,temp$FF_IND_48_num) #39 Boxes Shipping Containers,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2440) & (temp$SIC4 <= 2449 ),'BOXES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 2640) & (temp$SIC4 <= 2659 ),'BOXES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3220) & (temp$SIC4 <= 3221 ),'BOXES',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 3410) & (temp$SIC4 <= 3412 ),'BOXES',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BOXES',39,temp$FF_IND_48_num) #40 Trans Transportation,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4000) & (temp$SIC4 <= 4013 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4040) & (temp$SIC4 <= 4049 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4100) & (temp$SIC4 <= 4100 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4110) & (temp$SIC4 <= 4119 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4120) & (temp$SIC4 <= 4121 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4130) & (temp$SIC4 <= 4131 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4140) & (temp$SIC4 <= 4142 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4150) & (temp$SIC4 <= 4151 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4170) & (temp$SIC4 <= 4173 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4190) & (temp$SIC4 <= 4199 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4200) & (temp$SIC4 <= 4200 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4210) & (temp$SIC4 <= 4219 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4230) & (temp$SIC4 <= 4231 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4240) & (temp$SIC4 <= 4249 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4400) & (temp$SIC4 <= 4499 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4500) & (temp$SIC4 <= 4599 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4600) & (temp$SIC4 <= 4699 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4700) & (temp$SIC4 <= 4700 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4710) & (temp$SIC4 <= 4712 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4720) & (temp$SIC4 <= 4729 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4730) & (temp$SIC4 <= 4739 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4740) & (temp$SIC4 <= 4749 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4780) & (temp$SIC4 <= 4780 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4782) & (temp$SIC4 <= 4782 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4783) & (temp$SIC4 <= 4783 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4784) & (temp$SIC4 <= 4784 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4785) & (temp$SIC4 <= 4785 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4789) & (temp$SIC4 <= 4789 ),'TRANS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'TRANS',40,temp$FF_IND_48_num) #41 Whlsl Wholesale,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5000) & (temp$SIC4 <= 5000 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5010) & (temp$SIC4 <= 5015 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5020) & (temp$SIC4 <= 5023 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5030) & (temp$SIC4 <= 5039 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5040) & (temp$SIC4 <= 5042 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5043) & (temp$SIC4 <= 5043 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5044) & (temp$SIC4 <= 5044 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5045) & (temp$SIC4 <= 5045 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5046) & (temp$SIC4 <= 5046 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5047) & (temp$SIC4 <= 5047 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5048) & (temp$SIC4 <= 5048 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5049) & (temp$SIC4 <= 5049 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5050) & (temp$SIC4 <= 5059 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5060) & (temp$SIC4 <= 5060 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5063) & (temp$SIC4 <= 5063 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5064) & (temp$SIC4 <= 5064 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5065) & (temp$SIC4 <= 5065 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5070) & (temp$SIC4 <= 5078 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5080) & (temp$SIC4 <= 5080 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5081) & (temp$SIC4 <= 5081 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5082) & (temp$SIC4 <= 5082 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5083) & (temp$SIC4 <= 5083 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5084) & (temp$SIC4 <= 5084 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5085) & (temp$SIC4 <= 5085 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5086) & (temp$SIC4 <= 5087 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5088) & (temp$SIC4 <= 5088 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5090) & (temp$SIC4 <= 5090 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5091) & (temp$SIC4 <= 5092 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5093) & (temp$SIC4 <= 5093 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5094) & (temp$SIC4 <= 5094 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5099) & (temp$SIC4 <= 5099 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5100) & (temp$SIC4 <= 5100 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5110) & (temp$SIC4 <= 5113 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5120) & (temp$SIC4 <= 5122 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5130) & (temp$SIC4 <= 5139 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5140) & (temp$SIC4 <= 5149 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5150) & (temp$SIC4 <= 5159 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5160) & (temp$SIC4 <= 5169 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5170) & (temp$SIC4 <= 5172 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5180) & (temp$SIC4 <= 5182 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5190) & (temp$SIC4 <= 5199 ),'WHLSL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'WHLSL',41,temp$FF_IND_48_num) #42 Rtail Retail ,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5200) & (temp$SIC4 <= 5200 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5210) & (temp$SIC4 <= 5219 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5220) & (temp$SIC4 <= 5229 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5230) & (temp$SIC4 <= 5231 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5250) & (temp$SIC4 <= 5251 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5260) & (temp$SIC4 <= 5261 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5270) & (temp$SIC4 <= 5271 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5300) & (temp$SIC4 <= 5300 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5310) & (temp$SIC4 <= 5311 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5320) & (temp$SIC4 <= 5320 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5330) & (temp$SIC4 <= 5331 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5334) & (temp$SIC4 <= 5334 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5340) & (temp$SIC4 <= 5349 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5390) & (temp$SIC4 <= 5399 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5400) & (temp$SIC4 <= 5400 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5410) & (temp$SIC4 <= 5411 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5412) & (temp$SIC4 <= 5412 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5420) & (temp$SIC4 <= 5429 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5430) & (temp$SIC4 <= 5439 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5440) & (temp$SIC4 <= 5449 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5450) & (temp$SIC4 <= 5459 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5460) & (temp$SIC4 <= 5469 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5490) & (temp$SIC4 <= 5499 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5500) & (temp$SIC4 <= 5500 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5510) & (temp$SIC4 <= 5529 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5530) & (temp$SIC4 <= 5539 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5540) & (temp$SIC4 <= 5549 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5550) & (temp$SIC4 <= 5559 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5560) & (temp$SIC4 <= 5569 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5570) & (temp$SIC4 <= 5579 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5590) & (temp$SIC4 <= 5599 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5600) & (temp$SIC4 <= 5699 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5700) & (temp$SIC4 <= 5700 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5710) & (temp$SIC4 <= 5719 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5720) & (temp$SIC4 <= 5722 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5730) & (temp$SIC4 <= 5733 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5734) & (temp$SIC4 <= 5734 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5735) & (temp$SIC4 <= 5735 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5736) & (temp$SIC4 <= 5736 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5750) & (temp$SIC4 <= 5799 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5900) & (temp$SIC4 <= 5900 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5910) & (temp$SIC4 <= 5912 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5920) & (temp$SIC4 <= 5929 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5930) & (temp$SIC4 <= 5932 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5940) & (temp$SIC4 <= 5940 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5941) & (temp$SIC4 <= 5941 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5942) & (temp$SIC4 <= 5942 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5943) & (temp$SIC4 <= 5943 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5944) & (temp$SIC4 <= 5944 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5945) & (temp$SIC4 <= 5945 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5946) & (temp$SIC4 <= 5946 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5947) & (temp$SIC4 <= 5947 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5948) & (temp$SIC4 <= 5948 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5949) & (temp$SIC4 <= 5949 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5950) & (temp$SIC4 <= 5959 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5960) & (temp$SIC4 <= 5969 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5970) & (temp$SIC4 <= 5979 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5980) & (temp$SIC4 <= 5989 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5990) & (temp$SIC4 <= 5990 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5992) & (temp$SIC4 <= 5992 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5993) & (temp$SIC4 <= 5993 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5994) & (temp$SIC4 <= 5994 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5995) & (temp$SIC4 <= 5995 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5999) & (temp$SIC4 <= 5999 ),'RTAIL',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'RTAIL',42,temp$FF_IND_48_num) #43 Meals Restaraunts, Hotels, Motels,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5800) & (temp$SIC4 <= 5819 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5820) & (temp$SIC4 <= 5829 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 5890) & (temp$SIC4 <= 5899 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7000) & (temp$SIC4 <= 7000 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7010) & (temp$SIC4 <= 7019 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7040) & (temp$SIC4 <= 7049 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 7213) & (temp$SIC4 <= 7213 ),'MEALS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'MEALS',43,temp$FF_IND_48_num) #44 Banks Banking,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6000) & (temp$SIC4 <= 6000 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6010) & (temp$SIC4 <= 6019 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6020) & (temp$SIC4 <= 6020 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6021) & (temp$SIC4 <= 6021 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6022) & (temp$SIC4 <= 6022 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6023) & (temp$SIC4 <= 6024 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6025) & (temp$SIC4 <= 6025 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6026) & (temp$SIC4 <= 6026 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6027) & (temp$SIC4 <= 6027 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6028) & (temp$SIC4 <= 6029 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6030) & (temp$SIC4 <= 6036 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6040) & (temp$SIC4 <= 6059 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6060) & (temp$SIC4 <= 6062 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6080) & (temp$SIC4 <= 6082 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6090) & (temp$SIC4 <= 6099 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6100) & (temp$SIC4 <= 6100 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6110) & (temp$SIC4 <= 6111 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6112) & (temp$SIC4 <= 6113 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6120) & (temp$SIC4 <= 6129 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6130) & (temp$SIC4 <= 6139 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6140) & (temp$SIC4 <= 6149 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6150) & (temp$SIC4 <= 6159 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6160) & (temp$SIC4 <= 6169 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6170) & (temp$SIC4 <= 6179 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6190) & (temp$SIC4 <= 6199 ),'BANKS',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'BANKS',44,temp$FF_IND_48_num) #45 Insur Insurance,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6300) & (temp$SIC4 <= 6300 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6310) & (temp$SIC4 <= 6319 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6320) & (temp$SIC4 <= 6329 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6330) & (temp$SIC4 <= 6331 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6350) & (temp$SIC4 <= 6351 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6360) & (temp$SIC4 <= 6361 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6370) & (temp$SIC4 <= 6379 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6390) & (temp$SIC4 <= 6399 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6400) & (temp$SIC4 <= 6411 ),'INSUR',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'INSUR',45,temp$FF_IND_48_num) #46 RlEst Real Estate,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6500) & (temp$SIC4 <= 6500 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6510) & (temp$SIC4 <= 6510 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6512) & (temp$SIC4 <= 6512 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6513) & (temp$SIC4 <= 6513 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6514) & (temp$SIC4 <= 6514 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6515) & (temp$SIC4 <= 6515 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6517) & (temp$SIC4 <= 6519 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6520) & (temp$SIC4 <= 6529 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6530) & (temp$SIC4 <= 6531 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6532) & (temp$SIC4 <= 6532 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6540) & (temp$SIC4 <= 6541 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6550) & (temp$SIC4 <= 6553 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6590) & (temp$SIC4 <= 6599 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6610) & (temp$SIC4 <= 6611 ),'RLEST',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'RLEST',46,temp$FF_IND_48_num) #47 Fin Trading,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6200) & (temp$SIC4 <= 6299 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6700) & (temp$SIC4 <= 6700 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6710) & (temp$SIC4 <= 6719 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6720) & (temp$SIC4 <= 6722 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6723) & (temp$SIC4 <= 6723 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6724) & (temp$SIC4 <= 6724 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6725) & (temp$SIC4 <= 6725 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6726) & (temp$SIC4 <= 6726 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6730) & (temp$SIC4 <= 6733 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6740) & (temp$SIC4 <= 6779 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6790) & (temp$SIC4 <= 6791 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6792) & (temp$SIC4 <= 6792 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6793) & (temp$SIC4 <= 6793 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6794) & (temp$SIC4 <= 6794 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6795) & (temp$SIC4 <= 6795 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6798) & (temp$SIC4 <= 6798 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 6799) & (temp$SIC4 <= 6799 ),'FIN',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'FIN',47,temp$FF_IND_48_num) #48 Other Almost Nothing,temp$FF_IND_48_num) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4950) & (temp$SIC4 <= 4959 ),'OTHER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4960) & (temp$SIC4 <= 4961 ),'OTHER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4970) & (temp$SIC4 <= 4971 ),'OTHER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 4990) & (temp$SIC4 <= 4991 ),'OTHER',temp$FF_IND_48_name) temp$FF_IND_48_name <- ifelse((temp$SIC4 >= 9990) & (temp$SIC4 <= 9999 ),'OTHER',temp$FF_IND_48_name) temp$FF_IND_48_num <- ifelse(temp$FF_IND_48_name == 'OTHER',48,temp$FF_IND_48_num) dataframe_with_SIC4_and_FF48 <- temp table(dataframe_with_SIC4_and_FF48$FF_IND_48_name) table(dataframe_with_SIC4_and_FF48$FF_IND_48_num)