This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;; complete pspp commands and keywords | |
| ;; See GNU PSPP project at https://www.gnu.org/software/pspp/ | |
| ;; slightly modified version of Austin Bingham's | |
| ;; https://sixty-north.com/blog/writing-the-simplest-emacs-company-mode-backend.html | |
| (require 'company) | |
| ;; + | |
| (set (make-local-variable 'font-lock-keywords-case-fold-search) t) | |
| (defconst pspp-completions | |
| '("ADD DOCUMENT" | |
| "ADD" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | setwd(".") | |
| dir.create("./lib") | |
| ## download remark.js /it can be good idea to pin a specific version to be future-proof/ | |
| xaringan::summon_remark(version = "0.14.1", to = "./lib/") | |
| list.files("./lib/") | |
| ## file.create("minimal-example.rmd") | |
| # file.edit("minimal-example.rmd") or download | |
| url <- "https://raw.githubusercontent.com/ZGFabian/zgfabian.github.io/gh-pages/static/xaringan-prez/_minimal-example.rmd" | |
| download.file(url = url, destfile = "minimal-example.rmd") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| title: "Xaringan minimal example" | |
| author: "zgfabian" | |
| output: | |
| xaringan::moon_reader: | |
| seal: true | |
| css: [default, rutgers, rutgers-fonts] | |
| lib_dir: ./lib | |
| nature: | |
| highlightLines: true | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # eurostat-map.R | |
| # base code from: https://rstudio-pubs-static.s3.amazonaws.com/210495_a135718dda984805ada63d61bff87800.html | |
| # (Markus Kainu Generated: 2016-09-19) | |
| options(prompt = " ", continue = " ") | |
| library(colorout) | |
| library(eurostat) | |
| library(dplyr) | |
| library(ggplot2) | |
| # library(stringr) | |
| library(sf) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # COVID-19 death per million plots with custom theme | |
| # Data source: https://ourworldindata.org/ | |
| library(tidyverse) | |
| # library(ggthemes) | |
| library(extrafont) | |
| library(ggrepel) | |
| # Create a new theme | |
| theme_grey_b <- function(base_size = 10, base_famiy = "") { | |
| theme_bw() %+replace% | |
| theme( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Source of the codes used here with minor modifications: | |
| # http://www.sthda.com/english/wiki/text-mining-and-word-cloud-fundamentals-in-r-5-simple-steps-you-should-know | |
| # Install | |
| # Note: "tm" package require that libxml2-dev should be installed on your linux system. | |
| # install.packages("tm") # for text mining | |
| # install.packages("wordcloud") # word-cloud generator | |
| # install.packages("RColorBrewer") # color palettes | |
| # install.packages("wesanderson") # for Wes Anderson color palettes | |
| # Load | |
| library("tm") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| _now=$(date +"%m_%d_%Y_%T") | |
| _file="output/output_$_now.html" | |
| echo $_now | |
| echo $_file | |
| mkdir -p output | |
| echo "Starting output to $_file..." | |
| pspp $1 -o $_file && xdg-open $_file | |
| if [ $? -eq 0 ] | |
| then echo 'PSPP executed without errors. (This window will be closed in 10 sec.)' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              Show hidden characters
| { | |
| "scope": "source.pspp", | |
| "completions": | |
| [ | |
| { "trigger": "f", "contents": "FREQUENCIES" }, | |
| { "trigger": "des", "contents": "DESCRIPTIVES" }, | |
| { "trigger": "mea", "contents": "MEANS" }, | |
| { "trigger": "get", "contents": "GET FILE=" }, | |
| { "trigger": "cro", "contents": "CROSSTABS" }, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { "comment": "GNU PSPP syntax version 0.1.0", | |
| "name": "pspp", | |
| "scopeName": "source.pspp", | |
| "fileTypes": ["sps","SPS","out"], | |
| "foldingStartMarker": "\\{\\s*$", | |
| "foldingStopMarker": "^\\s*\\}", | |
| "patterns": [ | |
| { "name": "comment.block.pspp", | |
| "begin": "^[\\d\\.\\s]*?\/\\*", | |
| "end": "^[\\d\\.\\s]*?\\*\/" |