For data output, one option is to give users the option to download data from your app (see attached article).
Another option is to save your data to a database or external file system (for example Dropbox, Amazon S3). Because of the way shiny server works, it's not as simple as a write.csv() call. The article Persistent data storage in Shiny apps explores some of your options.
Since you are very new to R, I would strongly encourage you to get a good introduction to R first (we could recommend a few online courses or books if you'd like), and then a good introduction to Shiny (ginberg linked to a new set of lessions, and the shiny team made a nice three hour video series here..)