| title | author | output |
|---|---|---|
Moderated mediation sensitivity analysis |
Cedric Batailler |
github_document |
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
| library(tidyverse) | |
| library(rtweet) | |
| twitter_auth <- rtweet_user() | |
| auth_as(twitter_auth) | |
| # rm followers ------------------------------------------------------------ | |
| possibly_slowly_unfollow_user <- | |
| post_unfollow_user |> | |
| possibly(otherwise = "fail") |> |
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
| lm_outliers <- function(data, formula, id, verbose = FALSE) | |
| { | |
| if (!requireNamespace("dplyr", quietly = TRUE)) { | |
| stop("dplyr needed for this function to work. Please install it.", | |
| call. = FALSE) | |
| } | |
| if (!requireNamespace("rlang", quietly = TRUE)) { | |
| stop("rlang needed for this function to work. Please install it.", | |
| call. = FALSE) | |
| } |
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
| library(tidyverse) | |
| library(patchwork) | |
| library(Rcpp) # fix brms issue related to Rcpp namespace | |
| # dataset | |
| dataset <- | |
| data_frame(id = 1:20, | |
| y1 = rnorm(20), | |
| y2 = rnorm(20), | |
| y3 = rnorm(20)) |
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
| library(tidyverse) | |
| set.seed(123) | |
| dataset <- | |
| data.frame(group = rep(c("Group 1", "Group 2"), 25), | |
| id = 1:50, | |
| score = rnorm(50)) %>% | |
| mutate(score = ifelse(group == "Group 1", score - 3, score)) %>% | |
| add_row(group = "Group 1", id = "50", score = 2) |
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
| // LICENCE ----------------------------------------------------------------------------- | |
| // | |
| // Copyright 2018 - Cédric Batailler | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| // software and associated documentation files (the "Software"), to deal in the Software | |
| // without restriction, including without limitation the rights to use, copy, modify, | |
| // merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| // permit persons to whom the Software is furnished to do so, subject to the following | |
| // conditions: |