So it has been several years since I have done anything With R studio and I cannot remember a thing about it..
I have currently read 12 different CSV files into the console using the read_csv() function for each one respectively and this has given my twelve tibbles.
Now I need to combine these together using the bind_rows() function but I have no idea how to do this. Every attempt I have made has given the error code "argument 1 must have names"
Any help for a novice would be much appreciated. I have copied 2 parts of my code bellow.
Cheers
Read the Hereford crime data into R using function read_csv() in package readr
read_csv("2019-01-west-mercia-street.csv")
read_csv("2019-02-west-mercia-street.csv")
bind data frames
bind_rows("2019-01-west-mercia-street.csv", 2019-02-west-mercia-street.csv")
Error: Argument 1 must have names
Thats because you try to bind two strings together, where the function expects two
data.frames
.But if I were you, I'd import them all at once with
import_list()
from therio
package. Lets say you get all the 12 file names of the csv's withThen you could easily import and row bind them with
where
setclass
sets the output to a tibble.