From f068b2b9beecf51366ee7556680b08045952dff9 Mon Sep 17 00:00:00 2001 From: Rainer Walke Date: Fri, 26 Jul 2019 09:06:34 +0200 Subject: [PATCH] add R package structure --- .Rbuildignore | 2 ++ DESCRIPTION | 11 +++++++++++ NAMESPACE | 1 + R/hello.R | 18 ++++++++++++++++++ eoR.Rproj | 20 ++++++++++++++++++++ man/hello.Rd | 12 ++++++++++++ 6 files changed, 64 insertions(+) create mode 100644 .Rbuildignore create mode 100644 DESCRIPTION create mode 100644 NAMESPACE create mode 100644 R/hello.R create mode 100644 eoR.Rproj create mode 100644 man/hello.Rd 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/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..e6e906d --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,11 @@ +Package: eoR +Type: Package +Title: What the Package Does (Title Case) +Version: 0.1.0 +Author: Who wrote it +Maintainer: The package maintainer +Description: More about what it does (maybe more than one line) + Use four spaces when indenting paragraphs within the Description. +License: What license is it under? +Encoding: UTF-8 +LazyData: true 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..a793395 --- /dev/null +++ b/R/hello.R @@ -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: +# +# Install Package: 'Ctrl + Shift + B' +# Check Package: 'Ctrl + Shift + E' +# Test Package: 'Ctrl + Shift + T' + +hello <- function() { + print("Hello, world!") +} diff --git a/eoR.Rproj b/eoR.Rproj new file mode 100644 index 0000000..398aa14 --- /dev/null +++ b/eoR.Rproj @@ -0,0 +1,20 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +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() +}