Skip to content

Instantly share code, notes, and snippets.


Victor Ordu BroVic

View GitHub Profile
View list-functions.R
# install.packages('xlsx')
vals <- sapply(ls(pos = "package:dplyr"), function(x) {
if (is.function(get(x)))
funcs <- vals[vals]
BroVic / geopol.R
Last active Jun 18, 2021
Sample Code for Drawing Geo-political Zones
View geopol.R
# 1. Draw plot of North-East GPZ
# First, get the states of interest
# Then, pass them to the mapping function's `region` parameter
ne <- states(gpz = "ne")
region = ne,
title = "North-East Geopolitical Zone",
fill = TRUE,
View penta.R
# My Path. Use yours
path <-
"~/Documents/5-Personal/Data/DATA DHIS MONTHLY RI TEMPLATE 5.xlsx"
riData <- read_xlsx(path = path)
riData <- riData[-c(2:3),]
hdr <- unname(unlist(riData[1,]))
View example-interview.txt
Interview Transcript
Interviewer: Student
Interviewee: Associate Head of Mechanical Engineering
Interview Setting: Interview conducted in office of [professor's] office in the mechanical engineering building. The interview was conducted at 3:30 PM on Wednesday afternoon.
Affiliation with interviewee: Professor has been my professor for two classes. I have also spoken with him privately regarding attending graduate school and areas of study.
BroVic / arise-720.R
Last active May 27, 2021
Script for reviewing project 720 registrations
View arise-720.R
# To run this script on computer with R installed:
# Open the command line in the folder where the script is saved.
# Make sure it is saved as "arise-720-reg.csv" (Overwrite any old version of the file)
# At the prompt, run:
# Rscript arise-720-reg.csv
# If run for the first time, an internet connection may be rerquired to download required packages.
tidypack <- "tidyverse"
BroVic / client.R
Last active Aug 11, 2020
Implementing client-server connection in R
View client.R
# Socket connections
# Client side
client <- function(){
while (TRUE) {
con <- socketConnection(host = "localhost", port = 6011, blocking = TRUE,
server = FALSE, open = "r+")
f <- file("stdin")
BroVic / .gitignore
Last active Mar 11, 2021
Install gWidgets and gWidgetsRGtk2 archives
BroVic / install-pssqlite.ps1
Created Jun 19, 2020
A PowerShell script for installing the PSSQLite Module
View install-pssqlite.ps1
# install-pssqlite.ps1
# Copyright (c) 2018 Victor Ordu. All rights reserved.
# See LICENSE for details.
Write-Verbose "Checking for avaiablity of PSSQLite Module"
# Check if SQLite is (properly) installed
if(-not $ENV:Path.Contains('sqlite')) {
Write-Error "'sqlite3' does not exist or is not on system PATH."
BroVic / covid-ecdc.R
Last active Apr 22, 2020
A simple R script for displaying daily COVID-19 reporting by countries
View covid-ecdc.R
# Inspired by
# System requirements: Recent version of R e.g. R-3.6.x (
# Running the script:
# 1. From the command line: Navigate to directory where script is saved and
# there run this command:
# Rscript covid-ecdc.R
# 2. From the R console: Call the `source()` function using the relative or
BroVic / why-glue.R
Created Mar 16, 2020
Why would I want to use glue instead of base functions for string interpolation?
View why-glue.R
# Why 'glue' and not 'paste' or 'sprintf'
# adapting the example
name <- "Fred"
age <- 30
anniversary <- as.Date('1991-10-12')