Skip to contents

Search for milestones associated with authors whose names match a pattern.

Usage

search_authors(
  pattern,
  name_fields = c("givennames", "lname"),
  ignore.case = TRUE,
  output = c("mid", "print", "data"),
  ...
)

Arguments

pattern

Character string or regular expression to match against author names

name_fields

Character vector specifying which name fields to search. Options: "givennames", "lname" (last name), "prefix", "suffix". Default is c("givennames", "lname").

ignore.case

Logical; if TRUE (default), case is ignored during matching

output

Output format: "mid" returns milestone IDs (default), "print" prints formatted milestones, "data" returns milestone data frame

...

Additional arguments passed to print_milestone() when output = "print"

Value

Depends on output parameter (see search_milestones())

Details

This function searches author names and returns milestones associated with matching authors. The search is performed across specified name fields, and a milestone is returned if ANY associated author matches.

Examples

if (FALSE) { # \dontrun{
# Find milestones by Halley
search_authors("Halley")

# Find milestones by authors with "John" in their name
search_authors("John")

# Search only last names
search_authors("Playfair", name_fields = "lname")

# Print formatted results
search_authors("Nightingale", output = "print")
} # }