Steve's Miscellaneous Functions

carrec | Create multivariate data by permutation |

cor2data | Simulate Data from Correlation Matrix |

corvectors | Create multivariate data by permutation |

db_lselect | Lazily select variables from multiple tables in a relational... |

ess9_labelled | Some Labeled Data in the European Social Survey (Round 9) |

fct_reorg | Reorganize a factor after "re-leveling" it |

get_sims | Get Simulations from a Model Object (with New Data) |

get_var_info | Get a small data frame of the variable label and values. |

ggplot-themes | Steve's Preferred 'ggplot2' Themes and Assorted Stuff |

jenny | Set the Only Reproducible Seed That Matters |

make_perclab | Make Percentage Label for Proportion and Add Percentage Sign |

make_scale | Rescale Vector to Arbitrary Minimum and Maximum |

mround | Multiply a Number by 100 and Round It (By Default: 2) |

nin | Find Non-Matching Elements |

normal_dist | Make and annotate a normal distribution with 'ggplot2' |

ps_btscs | Create "peace years" or "spells" by cross-sectional unit,... |

p_z | Convert the p-value you want to the z-value it actually is |

r1sd | Scale a vector by one standard deviation |

r2sd | Scale a vector by two standard deviations |

rbnorm | Bounded Normal (Really: Scaled Beta) Distribution |

sbtscs | Create "peace years" or "spells" by cross-sectional unit |

show_ranef | Get a caterpillar plot of random effects from a mixed model |

smvrnorm | Simulate from a Multivariate Normal Distribution |

strategic_rivalries | Strategic Rivalries, 1494-2010 |

studentt | The Student-t Distribution (Location-Scale) |

tbl_df | Convert data frame to an object of class "tibble" |

usa_mids | United States Militarized Interstate Disputes (MIDs) |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.