From the documentation of read.csv.ffdf
.
transFUN: NULL or a function that is called on each data.frame chunk after reading with FUN and before further processing (for filtering, transformations etc.)
If one of your columns changes from being a factor to a numeric or vice versa, make sure it is a factor using transFUN
npi <- read.csv.ffdf(
file="C:/Users/DSA/Dropbox/Team Shared Files/People/Ross/NPI_Parse/Zips/npi_full.csv",
VERBOSE=TRUE, first.rows=10000,next.rows=100000,
transFUN=function(x){
x$yourcolumnwiththeerror <- factor(as.character(x$yourcolumnwiththeerror))
x
})