R shiny run time error

It seems like you are typing this on the console. YAML headers have to be used in .Rmd files, on the source pane.

Can you give more detail about your problem? Ideally, Can you provide a proper REPRoducible EXample (reprex) illustrating your issue?