View source: R/download.fpsim.data.R
| download.fpsim.data | R Documentation |
download.fpsim.data() will download available pre-made dyadic foreign
policy similarity data and place its contents the package's extdata/
directory. It leverages R's inst/ directory flexibility.
download.fpsim.data(confirm = FALSE, warning = TRUE, format = "rds")
confirm |
logical, defaults to FALSE. If FALSE, the function does not actually download the data. Set this to TRUE to confirm your intentions to download the data. |
warning |
logical, defaults to TRUE. If TRUE, the function returns a message advising you about the total size of the files you'll be downloading. If FALSE, no message is returned about the total file sizes. |
format |
a character vector determining what format to download. Defaults
to "rds" for the R serialized data frame format native to R. "qs" downloads the
data in a |
This function is named in such a way to avoid a function clash with the
download_extdata() function in peacesciencer. It also comes
from my aversion to the use of underscores in R function. There is nothing
wrong with this convention, but the chatbots have ruined it for me.
This function will not download FPSIM.rds. The download_extdata()
function in peacesciencer will do that.
download.fpsim.data()
# If you use this function, please inspect the extdata/ directory of the R
# package on your system. This function's output will tell you where it is.
# Thereafter, you can manually read a particular file into R. Something like
# this would work, though, if you had no idea where anything is.
#
# a <- paste0(system.file("extdata", package = "fpsim"),"/fpsim-votes-a.rds")
# Data <- readRDS(a)
# Data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.