make_shiny_search_fn: Embedded-Search 'search_fn' Factory for 'textcleaner_shiny()'

View source: R/search_shiny.R

make_shiny_search_fnR Documentation

Embedded-Search search_fn Factory for textcleaner_shiny()

Description

Returns a search_fn-shaped closure (matching textcleaner()'s own search_fn contract) for textcleaner_shiny's wizard: instead of opening a real browser window, it writes a DuckDuckGo results URL into store for the app's own search modal to render in an embedded iframe. See this file's own header comment for why a real Google results page cannot be embedded this way at all.

Exported (not just internal) because inst/Shiny/'s own module files are sourced into the global environment by Shiny's own app-loading mechanism, not into the package namespace – an unexported function is not reachable from there by its bare name.

Usage

make_shiny_search_fn(store)

Arguments

store

Function. A shiny::reactiveVal() (or any function accepting one argument) to write list(query =, url =) into whenever the returned closure is called

Value

A function(query, site, rlang) suitable for textcleaner()'s own search_fn argument

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>


SemNetCleaner documentation built on Oct. 16, 2026, 5:07 p.m.