Skip to content

Instantly share code, notes, and snippets.

View mjfrigaard's full-sized avatar
🏠
Working from home

Martin J Frigaard mjfrigaard

🏠
Working from home
View GitHub Profile
@mjfrigaard
mjfrigaard / stata_examples.ipynb
Created October 13, 2016 06:22 — forked from masnick/stata_examples.ipynb
SARIMAX - Stata Examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mjfrigaard
mjfrigaard / ICD9_Dx_dummy.md
Last active June 14, 2017 19:16
Creating Dummy Variables from Multiple Character (string) Variables
@mjfrigaard
mjfrigaard / secure_file_priv_issue_MySQL8.md
Last active August 24, 2018 01:49
Setting secure_file_priv to local folder in MySQL 8.0 (Mac OSX) - SO post

I am working on this portion of the MySQL tutorial for loading data from a .TSV file.

I have this data file:

[pet_file][1]

name	owner	species	sex	birth	death
Fluffy	Harold	cat	f	1993-02-04	
Claws	Gwen	cat	m	1994-03-17	
Buffy	Harold	dog	f	1989-05-13	
@mjfrigaard
mjfrigaard / RStudio_MPROJECT_setup.md
Last active August 30, 2018 18:35
Setting up RStudio on Ubuntu (UCSF PHDI)

Installing packages in RStudio on Ubuntu

This document covers installing packages on RStudio server (Ubuntu).

System Specs

Currently using:

Release 16.04.5 LTS (Xenial Xerus) 64-bit

Kernel Linux 4.4.0-134-generic x86_64

Part 1 - Setting up MySQL from the command line

Motivation

This document covers how to set up a MySQL database on your local desktop using the terminal and MySQL workbench.

What is MySQL

2-RDBMS connections in RStudio
================
Martin Frigaard
2018-09-13
# Motivation
This document will walk through how to setup and query a relational
database from RStudio with MySQL and SQLite.

Issue in MySQL dump

The mysql dump used to create the RDB_database did not load all the tables from RDB_shared.

From Boris

I am not sure I understand what problem you have.

As you can see, all 17 Dana’s tables are present in the dump file:

Hypertension sample (code review)

Motivation

This project requires selecting a sample of patients who meet the following criteria.

  1. aged 18-85
  2. had 2 encounters between 2015-01-01 and 2017-12-31 with a hypertension ICD9 diagnosis
@mjfrigaard
mjfrigaard / readxl_errror-2018-11-06.md
Created November 6, 2018 18:59
readxl error on iteration for importing many sheets into .csv files

Hi #rstats and #tidyverse folks!

I was hoping someone could help me with the error I am seeing when trying to get the functions from the excellent examples on readxl?

I have multiple sheets in an .xlsx file I want to read into data frames and write (a few) of them as .csv files.

Unfortunately I keep seeing this error:

@mjfrigaard
mjfrigaard / rayshader-error.md
Created October 11, 2019 20:32
error on rayshader package
#=====================================================================#
# This is code to create: rayshader error
# Authored by and feedback to: mjfrigaard
# MIT License
# Version: 1.0
#=====================================================================#


# error -------------------------------------------------------------------