Skip to content

Instantly share code, notes, and snippets.

Dominic Comtois dcomtois

Block or report user

Report or block dcomtois

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 pander-colwidths.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
@dcomtois
dcomtois / rendering_lists.Rmd
Created Apr 11, 2018
Rmarkdown - question on StackOverflow about lists
View rendering_lists.Rmd
---
title: "Rendering a list of objects in Rmarkdown"
author: "Dominic Comtois"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
css:
- !expr system.file("rmarkdown/templates/html_vignette/resources/vignette.css", package = "rmarkdown")
- !expr system.file("includes/stylesheets/summarytools.css", package = "summarytools")
---
@dcomtois
dcomtois / userDefineLang.xml
Created Dec 23, 2016
Notepad++ style configuration for SAS
View userDefineLang.xml
<NotepadPlus>
<UserLang name="sas" ext="sas" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00* 00; 01 02; 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@dcomtois
dcomtois / mydata.txt
Created Oct 26, 2016
Sample data for Cross-Validated Question
View mydata.txt
ID var valBin smok
1 Q11a 1 Yes
2 Q11a 1 Yes
3 Q11a 0 Yes
4 Q11a 0 Yes
5 Q11a 1 Yes
6 Q11a 0 Yes
7 Q11a 1 Yes
8 Q11a 1 Yes
9 Q11a 1 Yes
@dcomtois
dcomtois / letdate.sas
Created Apr 20, 2016
SAS Macro to easily assign dates to macro variables. Macro SAS pour définir facilement des variables macro dates.
View letdate.sas
/* ========================================================== */
/* Routine Macro %letdate */
/* ========================================================== */
/* */
/* Affecte une date à une variable macro */
/* et affiche sa valeur formattée au log. La donnée */
/* enregistrée reste une date SAS (numérique) ou non, */
/* selon le paramètre fmt fourni. */
/* */
/* Arguments: */
View systemtime_weirdness.R
system.time(lotsOfNumbers <- rep(pi, 5e7))
system.time(lotsOfNumbers[1] <- 0)
system.time(lotsOfNumbers[2] <- 0)
@dcomtois
dcomtois / demo.R
Last active Aug 29, 2015
Mtl R Users Group, May 2015 - Introducing summarytools & thoughts on package development
View demo.R
# Presentation Mtl R Users Group, 2015-05-06
# Dominic Comtois
# Introduction à Summarytools / Introducing summarytools
# Liens / links
# https://github.com/dcomtois/summarytools
# http://www.statconseil.com
# dominic.comtois@gmail.com
# github method (need devtools installed) -- most up-to-date version of summarytools
@dcomtois
dcomtois / r_c.txt
Last active Jan 6, 2019
Linking R (v3.1.2) internal & primitive C functions with appropriate source files (printname = R function name ; c.entry = C function ; sourcefile = relevant C source file)
View r_c.txt
printname c.entry sourcefile
- do_arith C:\R-3.1.2\src\main\arithmetic.c
! do_logic C:\R-3.1.2\src\main\logic.c
!= do_relop C:\R-3.1.2\src\main\relop.c
$ do_subset3 C:\R-3.1.2\src\main\subset.c
$<- do_subassign3 C:\R-3.1.2\src\main\subassign.c
%% do_arith C:\R-3.1.2\src\main\arithmetic.c
%*% do_matprod C:\R-3.1.2\src\main\array.c
%/% do_arith C:\R-3.1.2\src\main\arithmetic.c
& do_logic C:\R-3.1.2\src\main\logic.c
You can’t perform that action at this time.