This file contains 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
pull_labels <- function(data, as_list = FALSE) { | |
var_labels <- df %>% | |
purrr::map(~ attr(.x, "label")) %>% | |
purrr::map_dfr(~ tibble(label = .x), .id = "name") | |
if (as_list) { | |
var_labels <- as.list(spread(var_labels, name, label)) | |
} | |
return(var_labels) | |
} |
This file contains 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
/* | |
Author: Carlo Bottai - carlo.bottai@gmail.com | |
Copyright (c) 2020 - Carlo Bottai | |
Licence: MIT | |
Date: 2020-01-21 | |
This group of functions transform a JSON (generated by the bibtexParse function | |
used by ORCID from a BibTeX file) that contains bibliographic information, | |
in an HTML string thought to be included in a personal website. |
This file contains 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
\usepackage{tikz} | |
% \definecolor{color1}{rgb}{0.76, 0.13, 0.28} | |
\usetikzlibrary{shapes.geometric} | |
\newcommand\score[2]{ | |
\pgfmathsetmacro\pgfxa{#1+1} | |
\tikzstyle{score_squares}=[draw, rectangle, minimum width=6.5pt] | |
\begin{tikzpicture}[baseline] | |
\foreach \i in {1,...,#2} { |