| completion | R Documentation |
graphr() and its relatives take the names of node and tie variables,
layouts, and themes as strings, which means remembering what a network
holds. This offers those names to RStudio's completion system, so that
writing graphr(fict_lotr, node_color = " and pressing Tab lists the
variables fict_lotr holds, layout = " lists the layouts available,
and so on for every argument with a known set of values.
This is off until it is asked for, because it works by replacing one of RStudio's internal functions. That function is not part of a public interface, so a future version of RStudio can change it. Nothing else about completion changes: any line that is not one of these calls is passed to RStudio untouched, as is any line this cannot make sense of.
stocnet_completion(FALSE) puts RStudio's function back.
stocnet_completion(activate, persist = FALSE)
set_completion(activate, persist = FALSE)
activate |
Logical, by default TRUE. If TRUE, completion of argument values is switched on. If FALSE, RStudio's own completions are restored. If missing, the current state is reported and nothing changes. |
persist |
Logical, by default FALSE.
If TRUE, the choice is remembered across sessions,
by writing it to the user's configuration directory
(see |
Invisibly, TRUE where completion is now active and FALSE otherwise. Called for the effect it has on the IDE.
Other mapping:
check_layout,
layout_concentric(),
layout_configuration(),
layout_correspondence(),
layout_layered(),
layout_levels(),
layout_matching(),
layout_scaling(),
layout_spatial(),
layout_valence(),
plot_graphr,
plot_graphs,
plot_grapht
## Not run:
# In RStudio, switch completion on for this session:
stocnet_completion()
# Then type graphr(fict_lotr, node_color = " and press Tab.
# To switch it off again:
stocnet_completion(FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.