diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..91114bf --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,2 @@ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..b8d6ef6 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,13 @@ +Package: ekplektoR +Type: Package +Title: Network Analysis for Cell- and Systems Biology +Version: 0.1.0 +Author: Boris Steipe et al. +Maintainer: Boris Steipe +Description: ekplektor combines a workflow for affected-subnetwork discovery in + cancer genome data and analysis tools. +License: GPL-3 +Encoding: UTF-8 +LazyData: true +Suggests: testthat +RoxygenNote: 6.0.1 diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..d75f824 --- /dev/null +++ b/NAMESPACE @@ -0,0 +1 @@ +exportPattern("^[[:alpha:]]+") diff --git a/R/hello.R b/R/hello.R new file mode 100644 index 0000000..0815ed5 --- /dev/null +++ b/R/hello.R @@ -0,0 +1,12 @@ +# hello.R +# +# This is an example function which prints 'Hello, world!' and returns the first +# seven Fibonacci numbers. +# + +hello <- function() { + print("Hello, world!") + return(c(1, 1, 2, 3, 5, 8, 13)) +} + +# [END] \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..9743f32 --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +ekplektoR + +---------------------------------------------- +This package follows the structure and process +suggested by Hadley Wickham in: + + + R Packages + 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' +----------------------------------------------- + +Run before every commit: + library(devtools) + devtools::check() # or Cmd + Shift + E +DO NOT SUBMIT CODE that does not pass without error, warnings and notes. \ No newline at end of file diff --git a/ekplektoR.Rproj b/ekplektoR.Rproj new file mode 100644 index 0000000..5b5852f --- /dev/null +++ b/ekplektoR.Rproj @@ -0,0 +1,19 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 4 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: XeLaTeX + +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/man/hello.Rd b/man/hello.Rd new file mode 100644 index 0000000..0fa7c4b --- /dev/null +++ b/man/hello.Rd @@ -0,0 +1,12 @@ +\name{hello} +\alias{hello} +\title{Hello, World!} +\usage{ +hello() +} +\description{ +Prints 'Hello, world!'. +} +\examples{ +hello() +} diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..a93fb67 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(ekplektoR) + +test_check("ekplektoR") diff --git a/tests/testthat/testHello.R b/tests/testthat/testHello.R new file mode 100644 index 0000000..3998708 --- /dev/null +++ b/tests/testthat/testHello.R @@ -0,0 +1,10 @@ +# testHello.R +# +# +context("Demo test") + +test_that("hello.R returns a vector with the first seven Fibonacci numbers", { + expect_equal(sum(hello()), 33) +}) + +# [END] \ No newline at end of file