dat <- dat[-1,]
names(dat) <- dat[1,]
header.true <- function(df) {
names(df) <- as.character(unlist(df[1,]))
df[-1,]
}
names(dat) <- as.matrix(dat[1, ])
dat <- dat[-1, ]
dat[] <- lapply(dat, function(x) type.convert(as.character(x)))
dat
## Zip CuCurrent PaCurrent PoCurrent Contact Ext Fax email Status
## 1 74136 0 1 0 918-491-6998 0 918-491-6659 0 1
## 2 30329 1 0 0 404-321-5711 0 0 0 1
## 3 74136 1 0 0 918-523-2516 0 918-523-2522 0 1
## 4 80203 0 1 0 303-864-1919 0 0 0 1
## 5 80120 1 0 0 345-098-8890 456 0 0 1