Skip to content

Instantly share code, notes, and snippets.

Avatar

Hua Zhou Hua-Zhou

View GitHub Profile
@Hua-Zhou
Hua-Zhou / gist:6c11babe35437ce1ea8e4893a14d07c8
Last active Feb 20, 2020
install R package `sf` on CentOS 7
View gist:6c11babe35437ce1ea8e4893a14d07c8
Installation `sf` package in R on CentOS fails because `sf` requires gdal >v while CentOS yum install gives gdal v1.11.4.
1. Install Sqlite3 from source
```bash
configure
make -j4
sudo make install
```
Now system has two versions of Sqlite3 installed. One (old version) by yum, the other (most updated one) we just installed.
Executable is installed in: /usr/local/bin/sqlite3
@Hua-Zhou
Hua-Zhou / m012.jl
Created May 21, 2017 — forked from jiahao/m012.jl
Matvecs with matrices in PLINK v1 BEM format
View m012.jl
import Base: convert, rand, size, getindex, A_mul_B!
immutable PLINK1Matrix <: AbstractMatrix{UInt8}
m :: Int
n :: Int
data :: Array{UInt8}
end
size(M::PLINK1Matrix, i::Int) = i==1 ? M.m : i==2 ? M.n : error()
size(M::PLINK1Matrix) = (M.m, M.n)