Failing to deploy in shiny: Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), : Reader error: control characters are not allowed: #81 at 38

The 'Run document' works in RStudio and I can successfully create the interactive HTML output, but cannot publish it on shinyapps.io and it returns the following error message:

Preparing to deploy document...DONE
*Uploading bundle for document: 3917958...Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), : *

  • Reader error: control characters are not allowed: #81 at 38*
    Calls: ... tryCatch -> tryCatchList -> tryCatchOne ->
    Execution halted

I'm stuck here after hours of googling. I even tried to eliminate the character "Á", since I thought it might be the source of the problem, but it did not help. Any suggestion I can grasp as a shiny beginner would be greatly appreciated. :innocent:

Here is the probably relevant part of my script:

knitr::opts_chunk$set(echo = TRUE)

library(ggplot2)
library(wesanderson)
library(shiny)
library(dplyr)
library(yaml)


Sorszam <- 1:11
MEAN <-lpvt$MEAN
ANIMAL <- as.numeric(levels(lpvt$ANIMAL))
df <- data.frame(ANIMAL,MEAN, Sorszam)

ui <- fluidPage(
  titlePanel(title=h4("", align="center")),
  sidebarPanel( 
    checkboxGroupInput("ANIMAL", enc2utf8("Állatszám:"), ANIMAL, selected = ANIMAL)),
  mainPanel(plotOutput("plot2")))


server <- function(input,output){  
  dat <- reactive({
    test <- df[df$ANIMAL %in% input$ANIMAL,]
    print(test)
    test
  })

  output$plot2<-renderPlot({
    ggplot(dat(),aes(x=ANIMAL,y=MEAN, color = as.factor(ANIMAL))) +
        geom_point(size = 3)+
  ylab(enc2utf8("Átlag sejtszám denzitás (sejt/um2)")) +
  xlab(enc2utf8("Állatszám")) +
  theme_minimal() +
  theme(axis.title.y = element_text(size = rel(1.5), 
                                    angle = 90, 
                                    margin = margin(t = 0, r = 20, b = 0, l = 0)),
        axis.title.x = element_text(size = rel(1.5), 
                                    angle = 0, 
                                    margin = margin(t = 10, r = 0, b = 0, l = 0)),
        legend.title = element_text(size = rel(1), face = "bold"),
        legend.text = element_text(size = rel(1), angle = 0),
        axis.text  = element_text(size = rel(1.5), angle = 0),
        plot.title = element_text(color="darkgray", size=14, face="bold.italic")) + 
  ggtitle(enc2utf8("C-Fos denzitás a PVT-ben")) +
  scale_color_manual(values=wes_palette(n=sum(!is.na(ANIMAL)), name="Zissou1", type = "continuous"), name = enc2utf8("Állatszám")) +
  ylim(min(lpvt$MEAN),max(lpvt$MEAN))},
  height = 300, width = 500)}


shinyApp(ui, server)