Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Combining multiple .csv in R with numeric and non numeric values in R

$
0
0

I'm trying to combine multiple .csv files into one in a nice and easy script. Currently, I have the code

data_files = list.files(path=file_source, pattern = "*.csv", full.names = TRUE) %>%
  lapply(read_csv) %>%
  bind_rows 

but when inspecting the output it has replaced some values with NA. I believe this to be because some values are non-numeric, i.e. SMITH_201. Is there a way I can avoid this so that the non-numeric values are preserved?


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>