Skip to content

Instantly share code, notes, and snippets.

View selcukakbas's full-sized avatar

Selcuk Akbas selcukakbas

View GitHub Profile
@selcukakbas
selcukakbas / topicmodels_json_ldavis.R
Created November 4, 2017 15:16 — forked from christophergandrud/topicmodels_json_ldavis.R
Convert the output of a topicmodels Latent Dirichlet Allocation model to JSON for use with LDAvis
#' Convert the output of a topicmodels Latent Dirichlet Allocation to JSON
#' for use with LDAvis
#'
#' @param fitted Output from a topicmodels \code{LDA} model.
#' @param corpus Corpus object used to create the document term
#' matrix for the \code{LDA} model. This should have been create with
#' the tm package's \code{Corpus} function.
#' @param doc_term The document term matrix used in the \code{LDA}
#' model. This should have been created with the tm package's
#' \code{DocumentTermMatrix} function.
@selcukakbas
selcukakbas / r_stan_setup.sh
Created November 4, 2017 15:15 — forked from christophergandrud/r_stan_setup.sh
Setup R, RStudio,and Stan on Ubuntu (for Amazon EC2)
########################################################
# Set up RStudio and JAGS on an Amazon EC2 instance
# Using Ubuntu 64-bit
# Christopher Gandrud
# 16 December 2014
# Partially from http://blog.yhathq.com/posts/r-in-the-cloud-part-1.html
# See yhat for EC2 instance set up
########################################################
# In your terminal navigate to key pair