Recent posts

Introduction of renv package

2 minute read

R users have been complaining about the package version control for a long time. We admire python users, who can use simple commands to save and restore the packages with correct versions. The good news is that, RStudio recently introduced renv package to manage the local dependency and environment, filling the gap between R and python. renv resembles the conda / virtualenv concept in python.

Web Scraping of JavaScript website

2 minute read

In this post, I’m using selenium to demonstrate how to web scrape a JavaScript enabled page. If you had some experience of using python for web scraping, you probably already heard of beautifulsoup and urllib. By using the following code, we will be able to see the HTML and then use HTML tags to extract the desired elements. However, if the web page embedded with JavaScript, you will notice that some of the HTML elements can’t be seen from beautiful soup, because they are render by the JavaS...

Write Your Own R Packages

2 minute read

This post is to write my own util package to wrap all my udfs with a neat documentation.