Help spinning up a shiny app

There are a number of differences with your attempt and the example.
The example uses installation of shinydashboard and as discussed here the example uses the two-file approach for shiny apps where you need a server.R and ui.R file in a directory.