Case when

It’s often easier to use ifelse to implement conditioning. The fast implementation in data.table of ifelse is fifelse. Other approach to do multiple conditioning is to use data.table::fcase or dplyr::case_when. fcase fcase can be used directly x <- 1:6 data.table::fcase(x < 3, 1, x >= 4, 2) To implement in a data.

Read More

Connect to MS Access DB

DBI RODBC R6 Class Debug DBI Connection Updated 15.09.2022 Before connecting to your Access DBMS via Windows OS, you can check if you have the MS Access driver installed in your machine by running ## List everything odbc::odbcListDrivers() ## You will get the results someting like this.

Read More

SSH-key with Git on Windows

Updated: 2023-03-31 Generally, these are what I did: Install git-with-openssh Create SSH-key Add SSH-key to ssh-agent Create ~/.bashrc for auto-launching ssh-agent Common problems Netwrok folder not accessable Unable to push to origin with this error message. ssh: Could not resolve hostname personal: Name or service not known fatal: Could not read from remote repository.

Read More

Git Multiple account

config file Create a config file in your ~/.ssh folder that will manage your accounts. Host personal HostName github.com User git IdentityFile ~/.ssh/id_rsa_personal Host work HostName github.com User git IdentityFile ~/.ssh/id_rsa_work When cloning a new repo then you only have to specify hostname to your Git account.

Read More

Git Submodule

Rujukan di sini lebih teratur. Penerangan dibawah ialah berasaskan pengalaman sendiri tanpa struktur. Repo baru Bila buat repo baru dan ingin tetapkan submodule untuk tema harbor dan folder public ke yusbk.github.io. Submodule dipakai untuk memasukkan fungsi yang terdapat di repos lain ke dalam repos sendiri ie.

Read More