This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Replace Latex2rtf marker with actual images in LibreOffice | |
' Linux only, as the path is modified to remove the missing figure folder | |
Sub InsertLatex2RtfEps | |
oText = ThisComponent.Text | |
RDescrip = ThisComponent.createReplaceDescriptor | |
RDescrip.searchRegularExpression = True | |
RDescrip.searchString = "\[###([^\]]*)###\]" | |
rngs = ThisComponent.findAll(RDescrip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tmap) | |
library(sp) | |
library(rgeos) | |
library(maptools) | |
# Cartogram | |
# algorithm from Dougenik, Chrisman, Niemeyer (1985): An Algorithm To Construct Continuous Area Cartograms. In: Professional Geographer, 37(1), 75-81. | |
cartogram <- function(shp, weight, itermax=15, maxSizeError=1.0001) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=python-pypdftk | |
pkgver=0.3 | |
pkgrel=1 | |
pkgdesc="Python module to drive the awesome pdftk binary." | |
arch=('i686' 'x86_64') | |
url="https://github.com/revolunet/pypdftk" | |
license=('MT') | |
depends=('pdftk-bin') | |
makedepends=('python-setuptools') | |
source=("https://github.com//sjewo/pypdftk/archive/v${pkgver}.tar.gz") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: ZKenJ <[email protected]> | |
# Contributor: Cilyan | |
# Contributor: Dan Serban | |
# Contributor: sjewo | |
pkgname=slowmovideo-git | |
pkgver=20150206 | |
pkgrel=1 | |
pkgdesc="Video slow motion effect via interpolation" | |
arch=('i686' 'x86_64') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Filename: selectVariableRange.R | |
## Creation Date: 07-08-2014 | |
## Last Modified: Do 07 Aug 2014 14:21:37 CEST | |
## | |
## Description: New Operator to define an vector with | |
## index numbers of columns between two | |
## variable names. | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("rPython") | |
# requires pandas | |
stata13 <- function(dat, | |
convert.factors = TRUE){ | |
require("rPython") | |
# make dat known to python | |
python.assign('dat',dat) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Simplified loading and installing of packages | |
#' | |
#' This is a wrapper to \code{\link{require}} and \code{\link{install.packages}}. | |
#' Specifically, this will first try to load the package(s) and if not found | |
#' it will install then load the packages. Additionally, if the | |
#' \code{update=TRUE} parameter is specified it will check the currently | |
#' installed package version with what is available on CRAN (or mirror) and | |
#' install the newer version. | |
#' | |
#' @param pkgs a character vector with the names of the packages to load. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(XML) | |
library(plyr) | |
library(pbapply) | |
xlsxToR <- function(file, keep_sheets = NULL, header = FALSE) { | |
temp_dir <- file.path(tempdir(), "xlsxToRtemp") | |
suppressWarnings(dir.create(temp_dir)) | |
file.copy(file, temp_dir) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* NAME | |
* | |
* statistics-distributions.js - JavaScript library for calculating | |
* critical values and upper probabilities of common statistical | |
* distributions | |
* | |
* SYNOPSIS | |
* | |
* |
NewerOlder