Wondering if anyone has a good site to convert R code to SAS code. I was wondering if I can get help converting the following code to SAS. Any guidance is appreciative. require(dplyr) source("bisg_proxy/new_func.R") ia_s <-read.csv('ready_for_r.csv', colClasses = 'character') #add geo tract and geo block ia_2<- ia_s %>% mutate(geo_tract=paste(State, County, Censustrac, sep=''), geo_tract=gsub('[.]','',geo_tract))%>% mutate(geo_block=paste(State, County, Censustrac, BlockGrp, sep=''), geo_block=gsub('[.]','',geo_block)) # if blockgrp == 0, BISG at the tract level #note duplicated primary as secondary for name/dob as no secondary in file # if blockgrp == 0, BISG at the tract level ia_t <- ia_2 %>% filter(BlockGrp %in% c("0",NA)) %>% applyProxy(pri_first_name = 'pri_first_name', pri_last_name = 'pri_last_name', sec_first_name = 'sec_first_name', geoid = 'geo_tract', geoid_key = 'GeoInd', threshold = .75, keepall = T, census_geog = tract_attr_over18) # if blockgrp != 0, BISG at the block group level ia_b <- ia_2 %>% filter(BlockGrp != '0') %>% applyProxy(pri_first_name = 'pri_first_name', pri_last_name = 'pri_last_name', sec_first_name = 'sec_first_name', geoid = 'geo_block', geoid_key = 'geoind', threshold = .75, keepall = T, census_geog = blkgrp_attr_over18) ia_p <- rbind(ia_t, ia_b) %>% arrange(race, gender) #update header names if applicable ia_p_s <- ia_p %>% select(application_id, gender, race, pri_femaleprob:sec_maleprob, Probability_Asian:Probability_White, pri_address, pri_city, pri_state, pri_zip, State, County, Censustrac, BlockGrp, MSA, pri_first_name, pri_last_name) # this exports your file into your folder as a .csv write.csv(ia_p_s, file='proxied.csv', row.names=FALSE
... View more