I am getting the following error in my R program running on RStudio. "Error:could not find function "trim"". This is a shiny application that calls a function that calls another program. The program has been imported into the server function with " source("Utilities/utilities.R", chdir = TRUE)". This program uses the R function trim(). I have been looking for the package of this function with not success. Could anyone tell me in what package is the function trim() found? I am not sure if that package is installed in my environment and if is not, that might be the reason why the program can not find the function trim(). When I disable the utilities.R program that contains the function trim() by commenting on source #" source("Utilities/utilities.R", chdir = TRUE)" the error keeps appearing. It seems that it does not have to do with the function trim(). This is a problem that I have encountered several times and I have been able to solve it by clearing the workspace and by restarting anew session. However, this time, that procedure does not work. Any suggestions?