Nikita Gusarov
  • Background
  • Development
  • Publications
  • Talks
  • Posts
  • Contact

Posts

In this section you are welcome to find all my posts

July 28, 2023

An unexpected return to blogging

The third year of my PhD is arriving at it’s end and now all my forces are focused on the final manuscript writing, alongside with several side projects (done in collaboration with other PhD students). My experience of updating the blog on everyday basis at the start of February 2022 was more distracting from the work than I though, although it helped to keep the writing-oriented state of mind. This time, in order to boost my writing productivity I’ll attempt to return here more often with work related and personal updates.

read more
March 18, 2022

Coreboot update

It seems that I’ve taken quite a long time since the last post to return here. Such a long pause is mainly explained by my work on the thesis and participation in the Discrete Choice Analysis (DCA) school organised at EPFL. Probably I should make some posts with a more academic content, but it’s something for future projects.

Today I wanted to document the procedure for updating a Coreboot firmware on my X220. To give some context I should say that after I bought the laptop the summer of 2021, I nearly immediately swapped the proprietary Lenovo BIOS for the Coreboot. At that time it was done mostly for testing purposes, but as it worked pretty fine I started to use the X220 as my main laptop. Now I’ve decided to explore the procedure a little more.

read more
February 14, 2022

Metaprogramming in R

While reworking the DCE Simulation package for my Thesis, I’ve discovered one more interesting topic to speak about. We have already seen how to create a package, write documentation and implement OOP in R. Now it comes the time of Metaprogramming. But don’t be afraid of this unfamiliar term, we are going to see that the concepts behind it are fairly simple.

Most of the materials presented are adopted from this mazing book about advanced R. My task here is mostly the vulgarisation of the material.

read more
February 13, 2022

Pinephone daily driving

I’ve decided to break my streak of posts about R programming language, to write something more personal. This autumn, I’ve got a Pinephone for my birthday to tinker with and which had some software issues present at that time. About the same time I’ve deGoogled another old home to use with Lineage OS. So it was only in December that I managed to switch over to using my Pinephone for some time.

read more
February 12, 2022

OOP in R

In previous publications we have seen how to create a package with R: (1) the project’s structure generation, (2) the unit tests and their automation and (3) the documentation management. Now its time to dive deeper into programming with R. Today we are going to explore how one can use Object Oriented Programming (OOP) paradigm in R.

There exist multiple object types and programming conventions, each with a particular idea behind it. In this post we are going to explore their differences and see when each of them is more appropriate.

read more
February 11, 2022

Package documentation in R

Previously we have seen how to create a package: how to structure your code, what files to include and how to test your code. The next step in package creation is the documentation. We have spoken about its existence, but only briefly. Now we have some more time to describe the documentation mantainace procedure more in detail. For this we are going to use the roxygen2 package, which is included in devtool suite.

read more
February 10, 2022

Tests in R

Following the previous post about the package creation in R we are going to dive into some details about how to work with packages. The first thing of interest for us is the possibility to perform tests on the package’s contents in order to control the result. Such possibility greatly facilitates the workflow while creating a package and ensures its functionality.

What is testthat?

Focusing our attention on the devtools meta-package’s contents we encounter rather quickly a great number of tools to test packages. One of the key element here is the testthat package, which has a number of functions to perform tests. Among the advantages listed on the project’s official webpage we discover testthat is, as it:

read more
February 9, 2022

Creating packages with R

Some days ago I’ve started to revise the code of one particular R package I’m using in my thesis work. This is a particular package developed by our team and implemented by one of my friends - Antoine Dubois. The main idea behind the implemented toolset is the simulation of individual behaviour under the most popular behavioural models. The final product should simplify the model pen-testing and performance evaluation tasks for economists and experimentalists.

read more
February 8, 2022

Python alongside R

While working on my PhD thesis I’m usually facing the situation when I need to use both R and Python programming languages. R offers me the possibility to render neat scientific supports with rmarkdown package, which bring .Rmd support. Obviously, Python has similar format (pymarkdown and the .Pmd) available, it is not as well developed as the R counterpart. Moreover, I’m far more familiar with R statistical libraries, tidyverse suite and coding practices. However, at the same time I need Python dependencies: the most developed neural network (NN) libraries are written in Python or have their main interface in Python. For example, the well known TensorFlow has a Python based backend.

read more
  • ««
  • «
  • 1
  • 2
  • 3
  • »
  • »»
© Nikita Gusarov 2025