in visual mode: collapse R code within an R code chunk

In Rstudio, is it possible to fold r code within an R code chunk when being in visual mode?

the code could look like this:

#| label: function with output

myfunction <- function(x){
x %>% 
  dothis() %>%
  dothat()
}

myfunction(object)

so when I'm source mode I would be able to collapse the function, but in visual mode not?

(It seems so obvious, I hope I haven't overlooked it in the manuals)

I think that's a known issue: Collapsing R functions within code chunks is impossible · Issue #202 · quarto-dev/quarto · GitHub