R implementations