After highlighting the assignment in the source editor, go to the console and run this function. The selected code will be run and if it is reactive, it will be loaded as a function.

convert_selection(envir = NULL)

Arguments

envir

the environment shinyobjects should the load the objects into.