Learn R Programming

ergm (version 4.2.3)

search.ergmConstraints: Search the ERGM Constraint

Description

Searches through the ergm.constraints help page and prints out a list of constraints appropriate for the specified network's structural constraints, optionally restricting by additional keywords and search term matches.

Usage

search.ergmConstraints(search, keywords, name, packages)

Value

prints out the name and short description of matching constraints, and invisibly returns them as a list. If name is specified, prints out the full definition for the named constraint.

Arguments

search

optional character search term to search for in the text of the constraint descriptions. Only matching constraints will be returned. Matching is case insensitive.

keywords

optional character vector of keyword tags to use to restrict the results (i.e. 'curved', 'triad-related')

name

optional character name of a specific constraint to return

packages

optional character vector indicating the subset of packages in which to search

Author

skyebend@uw.edu

Details

Uses grep internally to match the search terms against the constraint description, so search is currently matched as a single phrase. Keyword tags will only return a match if all of the specified tags are included in the constraint

See Also

See also ergm.constraints for the complete documentation

Examples

Run this code
# \donttest{
# find all of the constraint that mention degrees
search.ergmConstraints('degree')

# search on multiple keywords
search.ergmConstraints(keywords=c('directed','dyad-independent'))

# print out the content for a specific constraint
search.ergmConstraints(name='b1degrees')

# request the bipartite keyword in the ergm package
search.ergmConstraints(keywords='directed', packages='ergm')
# }

Run the code above in your browser using DataLab