Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chung@molgen.mpg.de committed Jan 19, 2016
0 parents commit 98f2111
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.Rproj.user
.Rhistory
.RData
src/*.o
src/*.so
src/*.dll
14 changes: 14 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Package: decon
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1
Date: 2016-01-19
Author: Who wrote it
Maintainer: Who to complain to <yourfault@somewhere.net>
Description: More about what it does (maybe more than one line)
License: What license is it under?
LazyData: TRUE
Imports:
Rcpp (>= 0.12.1)
LinkingTo:
Rcpp
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exportPattern("^[[:alpha:]]+")
importFrom(Rcpp, evalCpp)
useDynLib(decon)
7 changes: 7 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

rcpp_hello <- function() {
.Call('decon_rcpp_hello', PACKAGE = 'decon')
}

3 changes: 3 additions & 0 deletions R/dome.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dome <- function(a,b){
a == b
}
18 changes: 18 additions & 0 deletions R/hello.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Cmd + Shift + B'
# Check Package: 'Cmd + Shift + E'
# Test Package: 'Cmd + Shift + T'

hello <- function() {
print("Hello, world!")
}
20 changes: 20 additions & 0 deletions decon.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: XeLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
12 changes: 12 additions & 0 deletions man/hello.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\name{hello}
\alias{hello}
\title{Hello, World!}
\usage{
hello()
}
\description{
Prints 'Hello, world!'.
}
\examples{
hello()
}
13 changes: 13 additions & 0 deletions man/rcpp_hello.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\name{rcpp_hello}
\alias{rcpp_hello}
\title{Hello, Rcpp!}
\usage{
rcpp_hello()
}
\description{
Returns an \R \code{list} containing the character vector
\code{c("foo", "bar")} and the numeric vector \code{c(0, 1)}.
}
\examples{
rcpp_hello()
}
17 changes: 17 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file was generated by Rcpp::compileAttributes
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

// rcpp_hello
List rcpp_hello();
RcppExport SEXP decon_rcpp_hello() {
BEGIN_RCPP
Rcpp::RObject __result;
Rcpp::RNGScope __rngScope;
__result = Rcpp::wrap(rcpp_hello());
return __result;
END_RCPP
}
23 changes: 23 additions & 0 deletions src/rcpp_hello.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <Rcpp.h>
using namespace Rcpp;

// This is a simple function using Rcpp that creates an R list
// containing a character vector and a numeric vector.
//
// Learn more about how to use Rcpp at:
//
// http://www.rcpp.org/
// http://adv-r.had.co.nz/Rcpp.html
//
// and browse examples of code using Rcpp at:
//
// http://gallery.rcpp.org/
//

// [[Rcpp::export]]
List rcpp_hello() {
CharacterVector x = CharacterVector::create("foo", "bar");
NumericVector y = NumericVector::create(0.0, 1.0);
List z = List::create(x, y);
return z;
}

0 comments on commit 98f2111

Please sign in to comment.