Skip to contents

Collect data from the personality-database API.

Usage

personality_database(profiles = "famous", category = "all",
  outFile = NULL, sort = "alphabet", start = 0, limit = Inf,
  retry = 10, sleep_time = 60, verbose = TRUE,
  cache = paste0(tempdir(), "/personality_database/"), list_cache = NULL,
  cores = detectCores() - 1)

Arguments

profiles

Name of the profile list, between famous, fictional, and discovery.

category

Name of the profile category, as listed under each list, or all (default).

outFile

Path to a .csv file to save results as.

sort

How the profile list should be sorted, between alphabet (default), hot, new, or top.

start

Profile from the list to start on.

limit

Maximum number of profiles to include.

retry

Logical; if TRUE, will retry after a failed attempt.

sleep_time

Number of seconds to wait between retries.

verbose

Logical; if FALSE, will not display status messages.

cache

Path to a directory in which to save raw responses.

list_cache

A saved profile list, or path to such a file, to collect scores for. Providing this avoids collecting a list initially.

cores

Number of CPU cores to split names across.

Value

a data.frame with entries for name (the original search term), guess, confidence, and female and male with count of matches.

Examples

if (FALSE) { # \dontrun{
# get scores from the 5 "HOT"est famous people
hot5 <- personality_database(limit = 5, sort = "hot")
} # }