App works in R Studio but not in Shinyapp.io

Hi,
I have a Shiny app code in its usual way:

library()
source("my.function.R")
UI <- fluidPage{...}
server <- function(input, output) {  Using my.function.R }
shinyApp(ui = ui, server = server)

The log says:

Warning: Error in my.function: could not find function "my.function"

How so? It works fine in R Studio!
Any idea of how I can solve it?
Thanks a lot

Maybe a directory issue?

Try:

source("./my.function.R")

Thanks, williaml! The problem persists. I do not know what is going on.

Your my.function.R needs to be in a www subfolder that uploads with the rest - and you need source("www/my.function.R") to include the file ; I recommend against a dot between my and function - that's asking for trouble - I'm a newbie and love the idea of being able to help - Let me know if I did !