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
"LD_* scout runtime" information: | |
{ | |
"can-write-uinput" : true, | |
"steam-installation" : { | |
"path" : "/home/emil/.steam", | |
"data_path" : "/home/emil/.steam", | |
"bin32_path" : "/home/emil/.steam/ubuntu12_32", | |
"steamscript_path" : "/usr/bin/steam", | |
"steamscript_version" : "1.0.0.78", | |
"issues" : [ |
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
System: | |
Host: computer Kernel: 5.15.0-89-generic x86_64 bits: 64 | |
Desktop: Cinnamon 5.6.8 Distro: Linux Mint 21.1 Vera | |
Machine: | |
Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required> | |
Mobo: ASUSTeK model: Pro WS WRX80E-SAGE SE WIFI II v: Rev 1.xx | |
serial: <superuser required> UEFI: American Megatrends v: 0204 | |
date: 11/10/2022 | |
CPU: | |
Info: 16-core model: AMD Ryzen Threadripper PRO 5955WX s bits: 64 |
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
library(googlesheets4) | |
library(kirkegaard) | |
theme_set(theme_bw()) | |
#read data | |
d = read_sheet("https://docs.google.com/spreadsheets/d/1cPApEVEPNj4DXTB7LN7hd7B6WxYQiottbfHFt72tCzE/edit#gid=0") | |
#transform to long form for plotting | |
d_long = d %>% |
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
library(tidyverse) | |
#simulate datasets | |
sibs = 20 | |
x = map_df(seq(0, 1, .01), function(r) { | |
#simulate sibling scores at correlation r | |
matrix = matrix(r, ncol = sibs, nrow = sibs) | |
diag(matrix) = 1 | |
mvrnorm(n = 1e4, | |
Sigma = matrix, |
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
library(kirkegaard) | |
#get cors with p values | |
cors = iris[-5] %>% | |
wtd.cor() | |
cors = mpg[map_lgl(mpg, is.numeric)] %>% | |
wtd.cor() | |
#long format |
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
#!/usr/bin/env Rscript | |
library(stringr) | |
#scape spaces | |
escape_spaces = function(x) { | |
str_replace_all(x, fixed(" "), "\\ ") | |
} | |
#get args | |
args = commandArgs(trailingOnly=TRUE) |
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
#CRAN versions dont work | |
#devtools::install_github("lmullen/gender") | |
#devtools::install_github("lmullen/genderdata") | |
library(rvest) | |
library(kirkegaard) | |
library(gender) | |
library(patchwork) | |
theme_set(theme_classic()) |
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
/* | |
Function | |
This bookmarklet helps you quickly search Google Scholar for a given string with added keywords. | |
By default these keywords are words related to mortality of diseases: prognosis, life expectancy, natural history and mortality. | |
You can change them below. | |
How to use | |
Make a new bookmark. In the location, place the javascript code below. | |
*/ | |
javascript:(function(){ |
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
### REPLICATION OF DUNKEL AND DUTTON 2016 | |
# Religiosity as a predictor of in-group favoritism within and between religious groups | |
# This assumes you have the OKCupid data loaded as d_main with various variables already created. | |
# recode ------------------------------------------------------------------ | |
#own race preference | |
d_main$prefer_own_race = (d_main$q123 == "Yes") %>% as.factor() | |
table(d_main$prefer_own_race) | |
#religious |
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
### ESTIMATE TEST-RETEST RELIABILITY OF ICAR5 | |
library(pacman) | |
p_load(kirkegaard, weights, psych, magrittr, ggplot2) | |
#install kirkegaard from https://github.com/Deleetdk/kirkegaard if necessary | |
# data -------------------------------------------------------------------- | |
#SAPA data | |
load("data/sapa/sapaICARData18aug2010thru20may2013.rdata") |
NewerOlder