Issue Running Exported R Script in RStudio: 'clean_data_frame' Not Found in 'namespace:exploratory'

Problem

When attempting to run an R Script for data wrangling exported from Exploratory, you may encounter the following error in RStudio:

Error: 'clean_data_frame' is not an exported object from 'namespace:exploratory'

Solution

To resolve this issue, follow these steps:

  1. Avoid Modifying .libPaths: Do not set the .libPaths in your Rprofile.site file. Modifying this can sometimes lead to conflicts and errors when running scripts.
  2. Start a Fresh R Session: Instead of reusing the existing R session in your RStudio, start a new session. This can help in isolating and resolving potential conflicts that may have occurred in the previous session.