Create your own package in R

From .R Files to R Packages: A Game Changer for Empirical Researchers Hello, fellow data enthusiasts! Today, we’re going to embark on a journey that will take us from a scattered mess of .

Handle duplicate packages in different paths

If you work with multiple work stations (multiple computers/laptops) sharing the same cloud folder. You might encounter this problem. Your Rstudio in different computers will have different default paths to install and load packages.

Johnson-Neyman for meta analysis

In applied research, we typically look at moderation effect of a moderator on the relationship between a predictor and an outcome variable. However, looking at the interaction term alone is very misleading.

Setup Java with R

To prevent future problems when using Java, you need to install Java to your machine correctly. Download the correct version of Java from https://www.java.com/en/download/manual.jsp Right-click the Java setup app to “Run as Admin” After installing Java, go to R and let your machine know the right path to Java (Make sure you run R as Admin as well).

Missing Git tab in Rstudio on Windows computer

Due to a new movement in the tech industry, organizations (e.g., companies or universities) will not allow their members to have complete control of their machines (i.e., administrative privileges or running programs as administrators).

refer to relative path in blogdown

When you write your posts/blogs on blogdown, you might not want to always refer to the absolute path appeared on your website (because you might change your domain name and all hell breaks loose).

Create your own hexagon in R

This is a super fast and easy way to create your first hexagon in R. Enjoy !!! # install.packages("hexSticker") library(hexSticker) ## Warning: package 'hexSticker' was built under R version 4.

How to add cover image to bookdown

<div style = "text-align: center"> ![](cover.jpg) </div> Alternatively, you can also use r block knitr::include_graphics('cover.jpg', dpi = NA)

Bookdown Statistics

It’s possible to have basic statistics from bookdown using connectapi (basic example). However, this feature is very limited. Hence, it is better to connect bookdown to Google Analytics to have better metrics.

How to connect bookdown with google analytics

Create Google Analytics account Choose “Analytics Accounts” Create “Properties & Apps” In “Data Streams”, “Add stream” with your website URL Under “Tagging Instructions”, click on gtag.js. You should see something like this: <!