Hello world!

This commit is contained in:
AG Damsbo 2022-09-22 10:10:29 +02:00
parent 732b8ac2e5
commit c45fd3370c
10 changed files with 86 additions and 0 deletions

2
.Rbuildignore Normal file
View File

@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$

11
DESCRIPTION Normal file
View File

@ -0,0 +1,11 @@
Package: minidplyr
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R:
person("Damsbo", "Andreas Gammelgaard", , "andreas@gdamsbo.dk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154"))
Description: What the package does (one paragraph).
License: GPL-3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1

3
NAMESPACE Normal file
View File

@ -0,0 +1,3 @@
# Generated by roxygen2: do not edit by hand
export(select2)

6
R/minidplyr-package.R Normal file
View File

@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"
## usethis namespace: start
## usethis namespace: end
NULL

15
R/slctr.R Normal file
View File

@ -0,0 +1,15 @@
#' Simple select function using subset()
#'
#' Simple parallel select function
#'
#' @param ds Data frame
#' @param vars Variables to be subset, quoted or numbered
#'
#' @return Data frame with the specified subset
#' @export
#'
#' @examples
#' select2(iris,"Petal.Width")
select2 <- function(ds, vars) {
subset(ds,select=vars)
}

View File

@ -1,2 +1,3 @@
# minidplyr # minidplyr
As part of the Advanced R course, we are doing this basic code-along package.

15
man/minidplyr-package.Rd Normal file
View File

@ -0,0 +1,15 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/minidplyr-package.R
\docType{package}
\name{minidplyr-package}
\alias{minidplyr}
\alias{minidplyr-package}
\title{minidplyr: What the Package Does (One Line, Title Case)}
\description{
What the package does (one paragraph).
}
\author{
\strong{Maintainer}: Damsbo Andreas Gammelgaard \email{andreas@gdamsbo.dk} (\href{https://orcid.org/0000-0002-7559-1154}{ORCID})
}
\keyword{internal}

22
man/select2.Rd Normal file
View File

@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slctr.R
\name{select2}
\alias{select2}
\title{Simple select function using subset()}
\usage{
select2(ds, vars)
}
\arguments{
\item{ds}{Data frame}
\item{vars}{Variables to be subset, quoted or numbered}
}
\value{
Data frame with the specified subset
}
\description{
Simple parallel select function
}
\examples{
select2(iris,"Petal.Width")
}

View File

@ -11,3 +11,8 @@ Encoding: UTF-8
RnwWeave: Sweave RnwWeave: Sweave
LaTeX: pdfLaTeX LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace

6
setup.R Normal file
View File

@ -0,0 +1,6 @@
usethis::use_description(list(License = "GPL-3"))
usethis::use_namespace()
dir.create("R")
usethis::use_package_doc()
usethis::use_roxygen_md()