How to list all installed R-packages

I don’t use R, and nor I do know much about it. However, I maintain R’s installation on linux machines at work. Today, I learned a new trick to list all installed R-packages. Here it is: ip = as.data.frame(installed.packages()[,c(1,3:4)]) ip = ip[is.na(ip$Priority),1:2,drop=FALSE] ip And here is the sample output: Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ip = as.data.frame(installed.packages()[,c(1,3:4)]) > ip = ip[is.na(ip$Priority),1:2,drop=FALSE] > ip Package Version akima akima 0.5-12 alr3 alr3 2.0.5 BRugs BRugs 0.8-6 car car 2.1-2 coda coda 0.18-1 colorspace colorspace 1.2-6 DEoptimR DEoptimR 1.0-5 dichromat dichromat 2.0-0 digest digest 0.6.9 distillery distillery 1.0-2 extRemes extRemes 2.0-7 fields fields 8.4-1 ... I don’t have time to explain what each line does. If you’re curious, you can check out using the references below: ...

October 5, 2017 · 1 min · 201 words · kenno

Build Docker Client for ARMv8

The other day, after successfully building Docker-ce 17.06.0-dev for Odroid C2 which has ARMv8 CPU, i couldn’t find Docker client. Maybe it was just me not building the Docker engine correctly. Anyway, after some more times, I also managed building the Docker client for the Odroid C2. It turned out, like many things, it wasn’t that hard after you figured it out. It’s worth to note too that the build instruction on https://github.com/docker/cli is to use Docker container. It didn’t work for me, and I decided to just build the Docker cli locally on the Odroid C2 instead. ...

October 1, 2017 · 1 min · 213 words · kenno

Install Grub on GPT

I came across a problem with grub being broken recently on a system running Ubuntu 16.04. This happened after the grub2 package got upgraded. This post will explain how I solved the problem. If you have similar issues, please do not just copy and paste the commands and execute on your machine. First read on, and try to understand it. Usually, when this happened in the past, we just need to chroot into the system and reinstall grub. On Ubuntu, assuming you’ve chrooted into the system, and the boot disk is /dev/sda, this could be done by running: ...

September 25, 2017 · 4 min · 690 words · kenno

Remove trailing whitespace with VIM

Here’s a quick tip on how to get rid of unwanted trailing whitespace using vim. Let’s say, I have the following code: Open that file with vim. The following command deletes any trailing white spaces. :%s/\s\+$//e Here’s the screenshot of the text after removing the whitespace: In search, \s finds whitespace (a space or tab). \+ finds one or more occurrences. $ matches the end of line, finally e flag means no error is displayed. ...

July 27, 2017 · 1 min · 96 words · kenno

RHCSA’s Prep

At the end of last year, I took a training to prepare for Red Hat Certified System Administrator (RHCSA EX200) exam. Now it’s February and I haven’t taken the exam yet. Even worse, I forgot most of the things I learned during that 3 day training. Well, since I’m being chased to get this exam done ASAP, with a passing grade of course, I think now it’s the best time to start revising the material again. As part as the exam prep, I’m going to post small challenges and solutions. ...

February 19, 2017 · 2 min · 280 words · kenno