An R package to analyze the parliamentary records of the 19th legislative period of the Bundestag, the German parliament.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

21 Zeilen
696B

  1. `%$%` <- function(f, x) f(x)
  2. `%.%` <- function(f, g) function(...) f(g(...))
  3. flip <- function(f) function(x, y) f(y, x)
  4. clear_na <- function(xs) xs[!is.na(xs)]
  5. check_directory <- function(path, create=F) {
  6. # check if download_dir exists
  7. if(file.access(path, mode=0) == -1) {
  8. if (create) {
  9. tryCatch(dir.create(path),
  10. error = stop_dir_not_creatable,
  11. warning = stop_dir_not_creatable)
  12. } else {
  13. stop("Directory does not exist. Use create = TRUE if you wish to create the directory.")
  14. }
  15. } else if (file.access(path, mode=2) == -1) {
  16. stop("Directory exists, but is not writeable.")
  17. }
  18. }