When working with Zip Codes, often times states with preceding "0"'s will get dropped i.e. Massachusetts addresses with a "02111" in a csv file will be imported and truncated to "2111".
Q1: What is the correct column header for the read.csv to keep ZIP codes intact?
Q2: What is the proper way to export dataframes and keep ZIP codes intact?
Source DF: FDIC
library(readr)
library(dplyr)
library(tidyr)
FDIC_1_source <- read_csv("OFFICES2_ALL.CSV")
NEState<-c("CT", "DC", "DE", "MA", "MD", "ME", "NH", "NJ", "NY", "PA", "RI", "VA", "VT")
FDIC_2_filtered<-FDIC_1_source[FDIC_1_source$STALP %in% NEState,]
write.csv(FDIC_2_filtered,file="FDIC_2_filtered.CSV")
The closest issue I found on SO is With Dates and Numbers however I can't think of a way to use the documentation for Zip codes.