R

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 .

Adding utteranc.es to blogdown academic hugo theme

After several hours struggling with multiple recommendations by David Fong Salmon Jesus Velez pugillum robb Michele Scipioni I still cannot see my comment section using https://utteranc.es/ I realize I did not have my webpage repo public.

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.

Correct Bibtex format

If you work with bookdown, Latex, Python, or anything that uses BibTex as the underlying citation document, you will understand the struggle that sometimes your document cannot be rendered correctly because you might miss a comma, year, or author.

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).

making your image and figure robust in bs4 bookdown

I struggle to find how to make my figures and images perfectly aligned in the center of my book. After looking around, I think I’ve found an adequate solution:

Fold code in bookdown

Following this answer by Sébastien Rochette, we can fold all code chunk in bookdown by Create a js folder in the same directory as your bookdown book Create 3 files in this js folder transition.