I don't think it's an easy one: X11 is what some operating systems (Linux typically) use to display windows.
So in your case, I don't think the error comes from shiny::runApp, I suspect it comes from a function inside the app that is trying to open a window. Does your error message have more lines that you didn't copy? Something like:
Warning: Error in : Please install X11 library to use this function.
1: shiny::runApp
2: some_other_function()
3: x11()
My guess is that you're attempting to run the app on a computer that doesn't support X11 (for example a server with no GUI), and the app is trying to open a plot window. This should be unnecessary for a Shiny app: the plots should be displayed in the browser, not in a separate window.
If I'm right, the only way to solve it is to look at the code of the app and figure out where that call is, and why it was needed.
One last weird thing: this error message doesn't look like atypical R error message. Did you translate it from another language? If not, that suggests to me that the author of the app wrote it, and may be referring to some internal library.
I am using a MacBook Air M1, could that be the reason for this error? And the only message that appears is indeed the one I sent, and I did not translate it from another language.
Warning: Error in : Please install X11 library to use this function.
1: shiny::runApp
So I think this is a message written by the app author, if you check the source code there might be some line like:
if( ! require("somePackage")){
stop("Please install X11 library to use this function.")
}
The exact package would depend on context, it could be something internal to your company. If I'm not mistaken, only reading the code or asking the original author can answer.
What @AlexisW states in their response is correct - your mac is missing a system component used to display windows in some graphic devices. It used to be included in your mac os system install a few versions ago by default, but this is no longer the case.
The good news is that X11 is handled by the XQuartz app on macs and is available at: https://www.xquartz.org/
To verify that it has been installed correctly, and available to R, in R, type:
library("grDevices")
capabilities()
and there should be an entry with X11 and TRUE underneath.