I've got a list of data frames which I want to use in an sqldf query. However I don't seem to be able to reference the data frames directly from the list within sqldf either by using $ or [].
my (vastly simplified) code is:
DF_List <- list(df1 = data.frame(N = 1:26, N2 = 27:52 ), df2 = data.frame(N = 1:26, L = letters[1:26] ))
sqldf("select * from DF_List$df1, DF_List$df2 where DF_List$df1.N = DF_List$df2.N")
The following works - but I want to reference the data frames directly from the list.
DF_List <- list(df1 = data.frame(N = 1:26, N2 = 27:52 ), df2 = data.frame(N = 1:26, L = letters[1:26] ))
new_df1 = DF_List$df1
new_df2 = DF_List$df2
sqldf("select * from new_df1, new_df2 where new_df1.N = new_df2.N")
select * from new_df1 join new_df2 using(N),