Could you explain me what I am doing wrong here? Issue seems to be very basic so I dont use reproducible example. Here is my code:
#first i load certain data bases in csv from my path
list.df_names=list.files("D:/my_path",pattern = ".csv")
The output of list.df_names
:
[1] "df1.csv" "df2.csv" "df3.csv"
Now what is my main issue:
list.df=list(get(list.df_names))
length(list.df)
output:
[1] 1
And length should be 3
because there are three data frames in my list. When I use this code(after loading dfs to R):
list.df.good=list(df1.csv,df2,csv,df3,csv)
lenght(list.df.good)
output
[1] 3
What am I wrong here? Writing all df names only to put them into list is really inconvenient in long run.
Thank you in advance.
EDIT1: I missed one importan information: I loaded all dfs from my list.df.names INTO R, so i have objects(data frames) named like this: df1.csv
, df2.csv
, df3.csv
. They are separate data frames and I want to put its content into one list.