pkgKitten/0000755000176200001440000000000014664375222012225 5ustar liggesuserspkgKitten/tests/0000755000176200001440000000000012346564426013370 5ustar liggesuserspkgKitten/tests/simpleTest.R0000644000176200001440000000007712346564426015650 0ustar liggesusers library(pkgKitten) demo("simpleDemo", package="pkgKitten") pkgKitten/MD50000644000176200001440000000211214664375222012531 0ustar liggesusersb9495a6683e0b8a6ede5a2ab8d7ae51f *ChangeLog 8268a24d67a3f9cd2974a7400fb15691 *DESCRIPTION d2946015b670bab9267bb69b1d2c8658 *NAMESPACE 644945d7b17da734a828d635f5f83eb1 *R/pkgKitten.R 7d1a4ab27912f621248f54fd2f70b362 *README.md 62d719a0b4ba6c47179ef6550a200b0d *demo/00Index d3565ea965a4cc3c05a2752843d23649 *demo/simpleDemo.R 78d76d0ebf2b7979ec17c2f3f74643b0 *inst/NEWS.Rd 045a41412e63142576e958b4e1f3dc1f *inst/replacements/NAMESPACE 8d0e7bfbaece7cd94e39cf627db62067 *inst/replacements/hello.R 4692d6b20a6276147928795918e0c496 *inst/replacements/hello.Rd 0d5236683bd4561ebc60378f02a0ff84 *inst/replacements/hello2.R 5476fe7ef88a074c77db10f3cafa46ff *inst/replacements/manual-page-stub.Rd 418be4ed226884187caa0019bc2b3051 *inst/replacements/test_hello.R bcc4593ec3314dba73b2d6f8826e17ed *inst/skel/R.gitignore fa18564c7dafd523566822596e8c76e6 *inst/skel/dot.Rbuildignore cf8c63dd6faf28db4781bd7e5fcb5443 *man/kitten.Rd 5c2a79b8606a80efec8722af664f665a *man/pkgKitten-package.Rd f4c03a0d724e3da08ec3287d5384dab9 *man/playWithPerPackageHelpPage.Rd d02bd8825d2adc56b714bba08f9d1747 *tests/simpleTest.R pkgKitten/R/0000755000176200001440000000000014663075002012416 5ustar liggesuserspkgKitten/R/pkgKitten.R0000644000176200001440000002305514663075002014506 0ustar liggesusers## pkgKitten -- A saner way to create packages to build upon ## ## Copyright (C) 2014 - 2024 Dirk Eddelbuettel ## ## This file is part of pkgKitten ## ## pkgKitten is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 2 of the License, or ## (at your option) any later version. ## ## pkgKitten is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with pkgKitten. If not, see . ##' The \code{kitten} function creates an (almost) empty example ##' package. ##' ##' The \code{kitten} function can be used to initialize a simple ##' package. It is created with the minimal number of files. What ##' distinguished it from the function \code{package.skeleton()} in ##' base R (which it actually calls) is that the resulting package ##' passes \code{R CMD check cleanly}. ##' ##' Because every time you create a new package which does \emph{not} ##' pass \code{R CMD check}, a kitten experiences an existential ##' trauma. Just think about the kittens. ##' @title Create a very simple package ##' @param name The name of the package to be created, defaults to \dQuote{anRpackage} ##' @param path The path to the location where the package is to be ##' created, defaults to the current directory. ##' @param author The name of the author, defaults to the result of ##' \code{\link[whoami]{fullname}} (or \dQuote{Your Name} as fallback). ##' @param maintainer The name of the maintainer, also defaults to ##' \code{\link[whoami]{fullname}} or \code{author} if the latter is given. ##' @param email The maintainer email address, defaults to ##' \code{\link[whoami]{email_address}} (or \dQuote{your@email.com} as fallback). ##' @param license The license of the new package, defaults to \dQuote{GPL-2}. ##' @param puppy Toggle whether \code{tinytest::puppy} add unit testing, default ##' to true (but conditional on \code{tinytest} being installed). ##' @param bunny Toggle whether \code{roxygen2} should be used for the ##' the creation of Rd files from R, default is true (but also conditional on ##' \code{roxygen2} being install). ##' @return Nothing is returned as the function is invoked for its ##' side effect of creating a new package. ##' @author Dirk Eddelbuettel kitten <- function(name = "anRpackage", path = ".", author, # or from 'whoami' if missing maintainer, # or from 'whoami' if missing email, # = email_address(), # or from 'whomai' if missing license = "GPL (>= 2)", # default choice puppy = TRUE, # default choice add tinytest bunny = TRUE) { # default choice add roxygen2 haswhoami <- requireNamespace("whoami", quietly=TRUE) hasroxygen <- requireNamespace("roxygen2", quietly=TRUE) if (missing(author)) author <- if (haswhoami) whoami::fullname("Your Name") else "Your Name" if (missing(maintainer)) maintainer <- author if (missing(email)) email <- if (haswhoami) whoami::email_address("your@email.com") else "your@email.com" call <- match.call() # how were we called call[[1]] <- as.name("package.skeleton") # run as if package.skeleton() was called env <- parent.frame(1) # access to what is in the environment if (file.exists(file.path(path, name))) { stop("Directory '", name, "' already exists. Aborting.", call.=FALSE) } assign("kitten.fake.fun", function() {}, envir = env) call <- call[ c(1L, which(names(call) %in% names(formals(package.skeleton)))) ] call[["list"]] <- "kitten.fake.fun" tryCatch(eval(call, envir = env), error = function(e){ stop(sprintf("error while calling `package.skeleton` : %s", conditionMessage(e))) }) message("\nAdding pkgKitten overrides.") root <- file.path(path, name) ## now pick things up from here DESCRIPTION <- file.path(root, "DESCRIPTION") if (file.exists(DESCRIPTION)) { x <- read.dcf(DESCRIPTION, fields = c("Package", "Type", "Title", "Version", "Date", "Description", "License")) ## add 'Authors@R' x <- cbind(x, matrix("person", 1, 1, dimnames=list("", "Authors@R"))) splitname <- strsplit(author, " ")[[1]] x[1, "Authors@R"] <- sprintf(r"(person("%s", "%s", role = c("aut", "cre"), email = "%s"))", paste(splitname[-length(splitname)], collapse=" "), splitname[length(splitname)], email) x[, "License"] <- license x[, "Title"] <- "Concise Summary of What the Package Does" x[, "Description"] <- "More about what it does (maybe more than one line)." write.dcf(x[1, c("Package", "Type", "Title", "Version", "Date", "Authors@R", "Description", "License"), drop = FALSE], file = DESCRIPTION) } dotgitignore <- system.file("skel", "R.gitignore", package="pkgKitten") tgtgitignore <- file.path(root, ".gitignore") if (!file.exists(tgtgitignore)) { file.copy(dotgitignore, tgtgitignore, overwrite=TRUE) message(" >> added .gitignore file") } dotRbuildignore <- system.file("skel", "dot.Rbuildignore", package="pkgKitten") tgtRbuildignore <- file.path(root, ".Rbuildignore") if (! file.exists(tgtRbuildignore)) { file.copy(dotRbuildignore, tgtRbuildignore, overwrite=TRUE) message(" >> added .Rbuildignore file") } playWithPerPackageHelpPage(name, path, maintainer, email) rtgt <- file.path(root, "R", "hello.R") rsrc <- system.file("replacements", "hello.R", package="pkgKitten") file.copy(rsrc, rtgt, overwrite=TRUE) rdtgt <- file.path(root, "man", "hello.Rd") rdsrc <- system.file("replacements", "hello.Rd", package="pkgKitten") file.copy(rdsrc, rdtgt, overwrite=TRUE) rm("kitten.fake.fun", envir = env) unlink(file.path(root, "R" , "kitten.fake.fun.R")) unlink(file.path(root, "man", "kitten.fake.fun.Rd")) rdtgt <- file.path(root, "NAMESPACE") rdsrc <- system.file("replacements", "NAMESPACE", package="pkgKitten") file.copy(rdsrc, rdtgt, overwrite=TRUE) if (puppy && requireNamespace("tinytest", quietly=TRUE)) { tinytest::setup_tinytest(root, verbose=FALSE) tinytgt <- file.path(root, "inst", "tinytest", paste0("test_", name, ".R")) tinysrc <- system.file("replacements", "test_hello.R", package="pkgKitten") file.copy(tinysrc, tinytgt, overwrite=TRUE) message(" >> added tinytest support") } if (hasroxygen && bunny) { rtgt <- file.path(root, "R", "hello2.R") rsrc <- system.file("replacements", "hello2.R", package="pkgKitten") file.copy(rsrc, rtgt, overwrite=TRUE) cwd <- getwd() setwd(root) cat("Encoding: UTF-8\n", file="DESCRIPTION", append=TRUE) roxygen2::roxygenize(".") setwd(cwd) } unlink(file.path(root, "Read-and-delete-me")) message("Deleted 'Read-and-delete-me'.") message("Done.\n") message("Consider reading the documentation for all the packaging details.") message("A good start is the 'Writing R Extensions' manual.\n") message("And run 'R CMD check'. Run it frequently. And think of those kittens.\n") invisible(NULL) } ##' The \code{playWithPerPackageHelpPage} function creates an basic ##' package help page. ##' ##' The \code{playWithPerPackageHelpPage} function can be used to ##' create a simple help page for a package. ##' ##' It has been split off from the \code{kitten} function so that it ##' can be called from other packages. As such, it is also exported ##' from \pkg{pkgKitten}. ##' ##' @title Create a very simple package help page ##' @param name The name of the package to be created, defaults to \dQuote{anRpackage} ##' @param path The path to the location where the package is to be ##' created, defaults to the current directory. ##' @param maintainer The name of the maintainer, defaults to ##' \dQuote{Your Name} or \code{author} if the latter is given. ##' @param email The maintainer email address. ##' @return Nothing is returned as the function is invoked for its ##' side effect of creating a new package. ##' @author Dirk Eddelbuettel playWithPerPackageHelpPage <- function(name = "anRpackage", path = ".", maintainer = "Your Name", email = "your@mail.com") { root <- file.path(path, name) helptgt <- file.path(root, "man", sprintf( "%s-package.Rd", name)) helpsrc <- system.file("replacements", "manual-page-stub.Rd", package="pkgKitten") ## update the package description help page if (file.exists(helpsrc)) { lines <- readLines(helpsrc) lines <- gsub("__placeholder__", name, lines, fixed = TRUE) lines <- gsub("Who to complain to ", sprintf( "%s <%s>", maintainer, email), lines, fixed = TRUE) writeLines(lines, helptgt) } invisible(NULL) } pkgKitten/demo/0000755000176200001440000000000012346602363013143 5ustar liggesuserspkgKitten/demo/00Index0000644000176200001440000000005112346561473014277 0ustar liggesuserssimpleDemo Simple demo of using kitten() pkgKitten/demo/simpleDemo.R0000644000176200001440000000074012346602363015365 0ustar liggesusers library(pkgKitten) setwd(tempdir()) # which gets deleted anyway kitten("simpleTest") # unfortunately testing fails :-/ R <- shQuote(file.path(R.home(component="bin"), "R")) Sys.setenv("R_TESTS"="") # needed for R CMD check; thanks for the tip, Hadley Sys.setenv("R_LIBS"=paste(.libPaths(), collapse=.Platform$path.sep)) system(paste(R, "CMD build simpleTest")) system(paste(R, "CMD check simpleTest_1.0.tar.gz")) pkgKitten/ChangeLog0000644000176200001440000001731414664372034014003 0ustar liggesusers2024-08-30 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.2.4 * DESCRIPTION (Authors@R): Added 2024-08-26 Dirk Eddelbuettel * R/pkgKitten.R: Reorder fields in DESCRIPTION for 'Authors@R' 2024-08-24 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll micro version and date * R/pkgKitten.R: Fill in 'Authors@R', omit Author, Maintainer 2024-05-19 Dirk Eddelbuettel * README.md: Use tinyverse.netlify.app for dependency badge 2024-02-16 Dirk Eddelbuettel * .github/workflows/ci.yaml (jobs): Update to actions/checkout@v4, add r-ci-setup actions 2023-11-16 Dirk Eddelbuettel * inst/skel/R.gitignore: Added C++ entries from gitignore GH repo 2023-11-15 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll micro version 2023-11-15 Paul Hodor * inst/replacements/test_hello.R: Added test file as replacement of setup_tinytest() default with added tests for the hello() function * inst/replacements/hello.R: better formatting of the "hello" output * R/pkgKitten.R: replace auto-generated test_.R with content of test_hello.R * R/pkgKitten.R: fixed path in call to tinytest; fixed typo in doc of kitten() 2023-05-06 Dirk Eddelbuettel * inst/skel/dot.Rbuildignore: Add .github 2023-03-11 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.2.3 * docs/mkdmt-src/: Updated for release 0.2.3 * docs/: Idem 2023-03-10 Dirk Eddelbuettel * R/pkgKitten.R (kitten): Reword Title, shorten default Description 2022-11-08 Dirk Eddelbuettel * .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3 2021-07-19 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.2.2 * docs/mkdmt-src/: Updated for release 0.2.2 * docs/: Idem 2021-07-18 Dirk Eddelbuettel * inst/replacements/hello2.R: Add function argument documentation 2021-04-07 Dirk Eddelbuettel * docs/mkdmt-src/: Moved mkdocs-material input 2021-04-06 Dirk Eddelbuettel * DESCRIPTION (URL, BugRreports): Added to DESCRIPTION file 2021-02-22 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.2.1 * docs-src/: Updated for release 0.2.1 * docs/: Idem 2021-02-20 Dirk Eddelbuettel * DESCRIPTION (Suggests): Also suggest roxygen2 * inst/replacements/hello2.R: Update example to hello2 2020-12-29 Dirk Eddelbuettel * .github/workflows/ci.yaml: Renamed from R-CMD-check.yaml and updated * README.md: Updated badge 2020-11-11 Dirk Eddelbuettel * R/pkgKitten.R (kitten): Call setup_tinytest() instead of puppy 2020-11-02 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll minor version * R/pkgKitten.R (kitten): Support new option 'bunny' to use roxygen2 * man/kitten.Rd: Documentation * inst/replacements/hello2.R: Dummy file with roxygen docs 2020-09-27 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.2.0 2020-09-26 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll minor version * R/pkgKitten.R (kitten): Run tinytest::puppy unless opted out * man/kitten.Rd: Document new option 'puppy' * DESCRIPTION (Suggests): New suggested on 'tinytest' * R/pkgKitten.R (kitten): Copy-in replacement NAMESPACE * inst/replacements/NAMESPACE: Replacement NAMESPACE * docs/: Added package website * docs-src/: Added package website inputs * README.md: Added badge and short sentence linking to documentation 2020-09-25 Dirk Eddelbuettel * .github/workflows/R-CMD-check.yaml: Updated to matrix, simplified 2020-09-24 Dirk Eddelbuettel * .travis.yml (dist): Use focal for CI * .github/workflows/R-CMD-check.yaml: Renamed with hyphens 2020-09-18 Dirk Eddelbuettel * .travis.yml: Use updated run.sh with BSPM support * .github/workflows/R.CMD.check.yaml: Idem * README.md: Add 'Actions' badge 2020-08-27 Dirk Eddelbuettel * .github/workflows/R.CMD.check.yaml: Renamed from main.yaml 2020-08-25 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll minor version * .github/workflows/main.yml: Add a GitHub Actions workflow * .Rbuildignore: Exclude .github 2020-05-30 Dirk Eddelbuettel * README.md: Add 'last commit' badge * .travis.yml: Switch to bionic and R 4.0.0 2020-01-22 Dirk Eddelbuettel * README.md: Add a Debian badge 2019-10-22 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.1.5 2019-10-18 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll minor version 2019-10-17 Andrew Coleman <30481896+aecoleman@users.noreply.github.com> * R/pkgKitten.R: Correct typo * man/playWithPerPackageHelpPage.Rd: Ditto 2019-03-24 Dirk Eddelbuettel * README.md: Add dependency badge 2018-11-15 helix123 * NEWS.Rd: Correct several typos 2017-10-14 Dirk Eddelbuettel * inst/replacements/manual-page-stub.Rd: Shorter and simpler due to more extensive use of Rd macros feeding data from DESCRIPTION 2017-10-13 Dirk Eddelbuettel * R/pkgKitten.R (kitten): Copy in .Rbuildignore if none present * inst/skel/dot.Rbuildignore: Added 2017-10-12 Dirk Eddelbuettel * R/pkgKitten.R (kitten): Copy in .gitignore if none present * inst/skel/R.gitignore: Added, courtesy of github/gitignore repo 2017-08-26 Dirk Eddelbuettel * .travis.yml: Update to using new.sh from r-travis 2016-11-13 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Release 0.1.4 * README.md: Canonical URL, added Installation note, minor edits 2016-11-12 Dirk Eddelbuettel * inst/replacements/manual-page-stub.Rd: Updated making use of the various macros defined in ${RHOME}/share/Rd/macros/system.Rd and described Section 2.13 of Writing R Extensions * NAMESPACE: Added explicit import for package.skeleton 2015-06-13 Dirk Eddelbuettel * DESCRIPTION: Version 0.1.3 2015-06-11 Dirk Eddelbuettel * DESCRIPTION (Suggests): Versioned Suggests: on whomai (>= 1.1.0) * R/pkgKitten.R (kitten): Use default value with email and name gathering functions (now offered by whoami 1.1.0 or later) 2015-06-09 Dirk Eddelbuettel * R/pkgKitten.R (kitten): Use email and name gathering functions from package 'whoami' (if available) in case email and name were not given; also rewrite Title: and Description: in a form that actually passes R CMD check --as-cran * man/kitten.Rd: Updated accordingly * DESCRIPTION (Suggests): Add whoami * .travis.yml (install): Add installation of whomai 2015-02-26 Dirk Eddelbuettel * .travis.yml (language): Using new native R support at Travis -- and reverted after realizing it leads to several additional minutes of forced installation of things we do not need 2014-09-11 Dirk Eddelbuettel * DESCRIPTION: Version 0.1.2 * R/pkgKitten.R (kitten): Correctly invoke new function 2014-09-09 Dirk Eddelbuettel * DESCRIPTION: Version 0.1.1 * inst/NEWS.Rd: Added 2014-09-07 Dirk Eddelbuettel * R/pkgKitten.R: New function playWithPerPackageHelpPage() to create a basic per-package manual page which purrs * man/playWithPerPackageHelpPage.Rd: Documentation for new function * NAMESPACE: Export new function 2014-06-13 Dirk Eddelbuettel * DESCRIPTION: Version 0.1.0 and first CRAN upload pkgKitten/NAMESPACE0000644000176200001440000000021313012074042013416 0ustar liggesusersexport(kitten, playWithPerPackageHelpPage) #importFrom(whoami, "fullname", "email_address") importFrom("utils", "package.skeleton") pkgKitten/inst/0000755000176200001440000000000014664371704013203 5ustar liggesuserspkgKitten/inst/skel/0000755000176200001440000000000014525414110014122 5ustar liggesuserspkgKitten/inst/skel/dot.Rbuildignore0000644000176200001440000000005614525251276017274 0ustar liggesusers^.git$ ^.*\.Rproj$ ^\.Rproj\.user$ ^\.github$ pkgKitten/inst/skel/R.gitignore0000644000176200001440000000201614525414110016233 0ustar liggesusers# Retrieved 2017-Oct-12 from https://github.com/github/gitignore/blob/master/R.gitignore # Licensed under CC0-1.0 https://github.com/github/gitignore/blob/master/LICENSE # History files .Rhistory .Rapp.history # Session Data files .RData # Example code in package build process *-Ex.R # Output files from R CMD build /*.tar.gz # Output files from R CMD check /*.Rcheck/ # RStudio files .Rproj.user/ # produced vignettes vignettes/*.html vignettes/*.pdf # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 .httr-oauth # knitr and R markdown default cache directories /*_cache/ /cache/ # Temporary files created by R markdown *.utf8.md *.knit.md ## Retrieved 2023-11-16 from https://github.com/github/gitignore/blob/main/C%2B%2B.gitignore # Prerequisites *.d # Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod *.smod # Compiled Static libraries *.lai *.la *.a *.lib # Executables *.exe *.out *.app pkgKitten/inst/replacements/0000755000176200001440000000000014525251023015650 5ustar liggesuserspkgKitten/inst/replacements/hello.Rd0000644000176200001440000000041112337514463017247 0ustar liggesusers\name{hello} \alias{hello} \title{ A simple function doing little } \description{ This function shows a standard text on the console. In a time-honoured tradition, it defaults to displaying \emph{hello, world}. } \examples{ hello() hello("and goodbye") } pkgKitten/inst/replacements/test_hello.R0000644000176200001440000000030514525251023020133 0ustar liggesusers ## example of simple test that always succeeds expect_equal(1 + 1, 2) ## test of placeholder function hello() expect_stdout(hello(), "Hello, world") expect_stdout(hello("kitty"), "Hello, kitty") pkgKitten/inst/replacements/manual-page-stub.Rd0000644000176200001440000000056413170405126021306 0ustar liggesusers\name{__placeholder__-package} \alias{__placeholder__-package} \alias{__placeholder__} \docType{package} \title{\packageTitle{__placeholder__}} \description{\packageDescription{__placeholder__}} \section{Package Content}{\packageIndices{__placeholder__}} \author{\packageAuthor{__placeholder__}} \section{Maintainer}{\packageMaintainer{__placeholder__}} \keyword{package} pkgKitten/inst/replacements/NAMESPACE0000644000176200001440000000023713733635777017117 0ustar liggesusers## export all regularly named functions ## (but allow for private functions whose name starts with a dot).name <- function(...) exportPattern("^[[:alpha:]]+") pkgKitten/inst/replacements/hello2.R0000644000176200001440000000071414074560631017171 0ustar liggesusers##' A placeholder function using roxygen ##' ##' This function shows a standard text on the console. In a time-honoured ##' tradition, it defaults to displaying \emph{hello, world}. ##' @param txt An optional character variable, defaults to \sQuote{world} ##' @return Nothing is returned but as a side effect output is printed ##' @examples ##' hello2() ##' hello2("and goodbye") ##' @export hello2 <- function(txt = "world") { cat("Hello, ", txt, "\n") } pkgKitten/inst/replacements/hello.R0000644000176200001440000000013714525251023017077 0ustar liggesusers ## a placeholder hello <- function(txt = "world") { cat("Hello, ", txt, "\n", sep = "") } pkgKitten/inst/NEWS.Rd0000644000176200001440000000645014664371750014254 0ustar liggesusers\name{NEWS} \title{News for Package \pkg{pkgKitten}} \newcommand{\ghpr}{\href{https://github.com/eddelbuettel/pkgkitten/pull/#1}{##1}} \newcommand{\ghit}{\href{https://github.com/eddelbuettel/pkgkitten/issues/#1}{##1}} \section{Changes in version 0.2.4 (2024-08-30)}{ \itemize{ \item The .Rbuildignore stanza now includes .github \item The support of and usage illustrations of \pkg{tinytest} are much enhanced (Paul Hudor in \ghpr{18} adressing \ghit{19} and \ghit{20}) \item The .gitignore file now includes C++ related files \item Improvements and polish to badges and continuous integration \item The DESCRIPTION file now contains an Authors@R entry } } \section{Changes in version 0.2.3 (2023-03-11)}{ \itemize{ \item Small improvement to generated Description: field and Title: \item Maintenance for continuous integration setup } } \section{Changes in version 0.2.2 (2021-07-19)}{ \itemize{ \item Small update to DESCRIPTION \item Document hello2() argument } } \section{Changes in version 0.2.1 (2021-02-22)}{ \itemize{ \item A small documentation error was corrected (David Dalpiaz in \ghpr{15}). \item A new option \sQuote{bunny} adds support for \pkg{roxygen2}. \item Continuous integration now use \code{run.sh} from \pkg{r-ci}. } } \section{Changes in version 0.2.0 (2020-09-27)}{ \itemize{ \item Continuous Integration uses the updated BSPM-based script on Travis and with GitHub Actions (Dirk in \ghpr{11} plus earlier commits). \item A new default \code{NAMESPACE} file is now installed (Dirk in \ghpr{12}). \item A package documentation website was added (Dirk in \ghpr{13}). \item Call \code{tinytest::puppy} if installed and not opted out (Dirk in \ghpr{14}). } } \section{Changes in version 0.1.5 (2019-10-22)}{ \itemize{ \item More extensive use of newer R macros in package-default manual page. \item Install \code{.Rbuildignore} and \code{.gitignore} files. \item Use the updated Travis run script. \item Use more Rd macros in default \sQuote{stub} manual page (\ghpr{8}). \item Several typos were fixed in README.md, NEWS.Rd and the manual page (\ghpr{9}, \ghpr{10}) } } \section{Changes in version 0.1.4 (2016-11-13)}{ \itemize{ \item Utilize newer R macros in package-default manual page. \item Repair a link to Writing R Extensions (PR \ghpr{7} by Josh O'Brien). } } \section{Changes in version 0.1.3 (2015-06-12)}{ \itemize{ \item The fields Title: and Description: in the file \code{DESCRIPTION} file are now updated such that they actually pass \code{R CMD check} on current versions of R. \item If installed, the \code{whoami} package (version 1.1.0 or later) is now used to discover the username and email in the \code{DESCRIPTION} file. } } \section{Changes in version 0.1.2 (2014-09-11)}{ \itemize{ \item Brown-bag fix of calling the new helper function with the correct order of arguments. } } \section{Changes in version 0.1.1 (2014-09-09)}{ \itemize{ \item New (exported) function \code{playWithPerPackageHelpPage()} which lets other packages create a non-complaint-generating package help page. } } \section{Changes in version 0.1.0 (2014-06-13)}{ \itemize{ \item Initial public version and CRAN upload. } } pkgKitten/README.md0000644000176200001440000000362314622430656013505 0ustar liggesusers## pkgKitten: Create packages that purr [![CI](https://github.com/eddelbuettel/pkgkitten/workflows/ci/badge.svg)](https://github.com/eddelbuettel/pkgkitten/actions?query=workflow%3Aci) [![License](https://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html) [![CRAN](https://www.r-pkg.org/badges/version/pkgKitten)](https://cran.r-project.org/package=pkgKitten) [![Dependencies](https://tinyverse.netlify.app/badge/pkgKitten)](https://cran.r-project.org/package=pkgKitten) [![Debian package](https://img.shields.io/debian/v/r-cran-pkgkitten/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-pkgkitten) [![Downloads](https://cranlogs.r-pkg.org/badges/pkgKitten?color=brightgreen)](https://www.r-pkg.org/pkg/pkgKitten) [![Last Commit](https://img.shields.io/github/last-commit/eddelbuettel/pkgkitten)](https://github.com/eddelbuettel/pkgkitten) [![Documentation](https://img.shields.io/badge/documentation-is_here-blue)](https://eddelbuettel.github.io/pkgkitten/) ![a kitten](http://2.bp.blogspot.com/-rUsj-zdsAls/UY81UzuYHsI/AAAAAAAAAJA/QMiiNxYuvdI/s1600/burmilla-kitten.png) The base R function `package.skeleton()` is very useful for creating new packages for R. It is also very upsetting as it has been producing the same files which trigger `R CMD check` in the exact same way. And as something terrible happens each time `R CMD check` barks, this package offers a wrapper function `kitten()` which leaves an adorable little package behind which does not upset `R CMD check`. So just think of the kittens. ### Installation The package is on [CRAN](https://cran.r-project.org) and can be installed via a standard ```r install.packages("pkgKitten") ``` ### Documentation Package documentation, help pages, and more is also available [here](https://eddelbuettel.github.io/pkgkitten/). ### Author Dirk Eddelbuettel ### License GPL (>= 2) pkgKitten/man/0000755000176200001440000000000013733651176013001 5ustar liggesuserspkgKitten/man/pkgKitten-package.Rd0000644000176200001440000000110712337514463016614 0ustar liggesusers\name{pkgKitten-package} \alias{pkgKitten-package} \alias{pkgKitten} \docType{package} \title{ Create simple packages using the \code{kitten} function. } \description{ The base R function \code{package.skeleton()} is very helpful, but insist on creating packages which do not pass \code{R CMD check}. That is silly, This package helps with this issue. No more, no less. } \author{ Dirk Eddelbuettel wrote the package and maintains it. } \keyword{package} \seealso{ \code{\link[utils:package.skeleton]{package.skeleton}}, the \sQuote{Writing R Extensions} manual. } pkgKitten/man/kitten.Rd0000644000176200001440000000367113750141536014566 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pkgKitten.R \name{kitten} \alias{kitten} \title{Create a very simple package} \usage{ kitten(name = "anRpackage", path = ".", author, maintainer, email, license = "GPL (>= 2)", puppy = TRUE, bunny = TRUE) } \arguments{ \item{name}{The name of the package to be created, defaults to \dQuote{anPackage}} \item{path}{The path to the location where the package is to be created, defaults to the current directory.} \item{author}{The name of the author, defaults to the result of \code{\link[whoami]{fullname}} (or \dQuote{Your Name} as fallback).} \item{maintainer}{The name of the maintainer, also defaults to \code{\link[whoami]{fullname}} or \code{author} if the latter is given.} \item{email}{The maintainer email address, defaults to \code{\link[whoami]{email_address}} (or \dQuote{your@email.com} as fallback).} \item{license}{The license of the new package, defaults to \dQuote{GPL-2}.} \item{puppy}{Toggle whether \code{tinytest::puppy} add unit testing, default to true (but conditional on \code{tinytest} being installed).} \item{bunny}{Toggle whether \code{roxygen2} should be used for the the creation of Rd files from R, default is true (but also conditional on \code{roxygen2} being install).} } \value{ Nothing is returned as the function is invoked for its side effect of creating a new package. } \description{ The \code{kitten} function creates an (almost) empty example package. } \details{ The \code{kitten} function can be used to initialize a simple package. It is created with the minimal number of files. What distinguished it from the function \code{package.skeleton()} in base R (which it actually calls) is that the resulting package passes \code{R CMD check cleanly}. Because every time you create a new package which does \emph{not} pass \code{R CMD check}, a kitten experiences an existential trauma. Just think about the kittens. } \author{ Dirk Eddelbuettel } pkgKitten/man/playWithPerPackageHelpPage.Rd0000644000176200001440000000226113733651176020423 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pkgKitten.R \name{playWithPerPackageHelpPage} \alias{playWithPerPackageHelpPage} \title{Create a very simple package help page} \usage{ playWithPerPackageHelpPage(name = "anRpackage", path = ".", maintainer = "Your Name", email = "your@mail.com") } \arguments{ \item{name}{The name of the package to be created, defaults to \dQuote{anRpackage}} \item{path}{The path to the location where the package is to be created, defaults to the current directory.} \item{maintainer}{The name of the maintainer, defaults to \dQuote{Your Name} or \code{author} if the latter is given.} \item{email}{The maintainer email address.} } \value{ Nothing is returned as the function is invoked for its side effect of creating a new package. } \description{ The \code{playWithPerPackageHelpPage} function creates an basic package help page. } \details{ The \code{playWithPerPackageHelpPage} function can be used to create a simple help page for a package. It has been split off from the \code{kitten} function so that it can be called from other packages. As such, it is also exported from \pkg{pkgKitten}. } \author{ Dirk Eddelbuettel } pkgKitten/DESCRIPTION0000644000176200001440000000230314664375222013731 0ustar liggesusersPackage: pkgKitten Type: Package Title: Create Simple Packages Which Do not Upset R Package Checks Version: 0.2.4 Date: 2024-08-30 Authors@R: person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org", comment = c(ORCID = "0000-0001-6419-907X")) Description: Provides a function kitten() which creates cute little packages which pass R package checks. This sets it apart from package.skeleton() which it calls, and which leaves imperfect files behind. As this is not exactly helpful for beginners, kitten() offers an alternative. Unit test support can be added via the 'tinytest' package (if present), and documentation-creation support can be added via 'roxygen2' (if present). License: GPL (>= 2) Suggests: whoami (>= 1.1.0), tinytest, roxygen2 URL: https://github.com/eddelbuettel/pkgkitten, https://eddelbuettel.github.io/pkgkitten/ BugReports: https://github.com/eddelbuettel/pkgkitten/issues RoxygenNote: 6.0.1 NeedsCompilation: no Packaged: 2024-08-30 16:32:36 UTC; edd Author: Dirk Eddelbuettel [aut, cre] () Maintainer: Dirk Eddelbuettel Repository: CRAN Date/Publication: 2024-08-30 17:00:02 UTC