![Imgur Link](https://i.stack.imgur.com/vSxt2.png)
Сообщение об ошибке:
Ошибка: by
не может содержать столбец соединения id
, который отсутствует в вызове LHS rlang::last_error()
для просмотраbacktrace
Я перепробовал множество вариантов, но похоже, что Rstudio не может распознать, что «id» - это столбец в двух отдельных таблицах, не зная, что мне делать.
КОД ВВОДА:
## View the names of the tables in the database
tables <- dbListTables(mydb)
tables
## View the columns in each of the tables that we have and store each as a dataframe
orders <- data.frame(dbListFields(mydb, 'orders'))
product_sales <- data.frame(dbListFields(mydb, 'product_sales'))
orders
product_sales
library(tidyverse)
# perform a left join to create one table
left_join(orders, product_sales, by = "id")