Having trouble with my code while trying to import my data with a column that exceeds the maximum integer (.Machine$integer.max = 2147483647). Using readr's read_csv I believe it's importing as NA instead of rounding off. The complication comes from trying to import multiple csvs with rbindlist.
Here is my current setup:
load_df_path <- file.path(".../dffolder") #path to folder
df_path_files <- list.files <- (load_df_path, full.names = TRUE) #list files in path
df <- rbindlist(lapply(df_path_files, read_csv)) # read in csvs using readr
How do I write the last line to import the csvs and turn the column "amount" to characters instead of integers?
Here are a few things I tried without any luck...
## This gets error: Error in switch(tools::file_ext(path)....
df <- rbindlist(lapply(df_path_files, read_csv(df_path_files, col_types = list(amount = col_character()))))
## recreate read_csv and changed col_types = NULL to the above but getting the warning
## Error in FUN(X[[i]], ...) : could not find function "read_delimited"
tl;dr - need help importing a list of csvs while changing specific column to character format or an int64.
Thank you.