Skip to content

Instantly share code, notes, and snippets.

Doug Manuel DougManuel

Block or report user

Report or block DougManuel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Rprofile.R
# To source this file into an environment to avoid cluttering the global workspace, put this in Rprofile:
# my.env <- new.env(); sys.source("C:/PathTo/THIS_FILE.r", my.env); attach(my.env)
#-----------------------------------------------------------------------
# Load packages, set options and cwd, set up database connection
#-----------------------------------------------------------------------
## Load packages
# require(ggplot2) #plotting
# require(plyr) #data manipulation
@DougManuel
DougManuel / clickable-imgs.js
Created Dec 6, 2018 — forked from bearloga/clickable-imgs.js
Make the figures click-able in your RMarkdown=>HTML reports.
View clickable-imgs.js
<script language="JavaScript">
$(function() {
/* Lets the user click on the images to view them in full resolution. */
$("div.figure img").wrap(function() {
var link = $('<a/>');
link.attr('href', $(this).attr('src'));
link.attr('title', $(this).attr('alt'));
link.attr('target', '_blank');
return link;
});
@DougManuel
DougManuel / BarChart.js
Created Apr 3, 2017 — forked from ThomasBurleson/BarChart.js
Reusable Chart component for D3 - using prototypes and factories
View BarChart.js
(function() {
// Based on article @ http://www.toptal.com/d3-js/towards-reusable-d3-js-charts
// Publish a factory method for Chart instances
// @usage:
// var runningChart = BarChart.instanceOf( {barPadding : 2 } );
// var weatherChart = BarChart.instanceOf()
// .fillColor('coral');
window.BarChart = {
View .block
license: mit
border: no
@DougManuel
DougManuel / defineVarsFromClassName.js
Last active Aug 29, 2015 — forked from netsi1964/defineVarsFromClassName.js
Define in global scope vars for each used CSS classname
View defineVarsFromClassName.js
(function defineVarsFromClassName() {
var needVar = $("[class]"),
definedVars = "";
for (var i = 0; i < needVar.length; i++) {
var $this = $(needVar[i]);
var classes = $this.attr("class").split(" ");
for (var ii = 0; ii < classes.length; ii++) {
var sClassName = $.trim(classes[ii]);
if (sClassName.length > 0) {
var $us = $("." + sClassName);
You can’t perform that action at this time.