Skip to content
/ myRpackage Public template

A starter R package scaffold, structured for publication on CRAN, with boilerplate files and metadata to begin development immediately.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

DiogoRibeiro7/myRpackage

myrpackage myrpackage logo

R-CMD-check Codecov test coverage CRAN status Lifecycle: stable License: MIT

A friendly R package that provides greeting and farewell functions in multiple languages.

Installation

You can install the development version of myrpackage from GitHub with:

# install.packages("devtools")
devtools::install_github("DiogoRibeiro7/myrpackage")

Usage

Basic Examples

library(myrpackage)

# Say hello with default parameters
hello()
#> Hello, world!

# Say hello to someone specific
hello("R Users")
#> Hello, R Users!

# Say hello in different languages
hello("amigos", language = "spanish")
#> Hola, amigos!

hello("mes amis", language = "french")
#> Bonjour, mes amis!

# Say hello with capitalization
hello("r users", capitalize = TRUE)
#> Hello, R users!

# Say goodbye
goodbye()
#> Goodbye, world!

goodbye("friends", language = "portuguese")
#> Adeus, friends!

# Customize punctuation
goodbye("everyone", exclamation = FALSE)
#> Goodbye, everyone.

Features

  • 🌐 Multilingual greeting and farewell functions in 6 languages
  • πŸ”  Text formatting options including capitalization
  • πŸ“¦ Proper R package structure
  • πŸ“„ Comprehensive documentation
  • πŸ§ͺ Complete test coverage
  • πŸ”„ Continuous Integration workflow

Supported Languages

  • English (default)
  • Spanish
  • French
  • Portuguese
  • German
  • Italian

Function Options

Both hello() and goodbye() support these parameters:

  • name: Who to greet (default: "world")
  • language: Language to use (default: "english")
  • exclamation: Whether to add an exclamation mark (default: TRUE)
  • capitalize: Whether to capitalize the name (default: FALSE)

Package Structure

myrpackage/
β”œβ”€β”€ DESCRIPTION          # Package metadata
β”œβ”€β”€ NAMESPACE           # Exported functions
β”œβ”€β”€ R/                  # R source code
β”‚   β”œβ”€β”€ hello.R         # Hello function
β”‚   β”œβ”€β”€ goodbye.R       # Goodbye function
β”‚   β”œβ”€β”€ utils.R         # Utility functions
β”‚   β”œβ”€β”€ lifecycle.R     # Lifecycle definitions
β”‚   └── myrpackage-package.R  # Package documentation
β”œβ”€β”€ man/                # Documentation
β”œβ”€β”€ tests/              # Tests
β”‚   └── testthat/       # Unit tests
β”œβ”€β”€ vignettes/          # Long-form documentation
β”‚   β”œβ”€β”€ intro.Rmd       # Introduction vignette
β”‚   └── advanced.Rmd    # Advanced usage vignette
β”œβ”€β”€ inst/               # Installed files
β”‚   └── CITATION        # Citation information
└── LICENSE             # MIT license

Development

Getting Started

  1. Clone the repository
  2. Open the project in RStudio or your preferred R environment
  3. Install development dependencies with devtools::install_dev_deps()

Running Tests

# Run tests
devtools::test()

# Check test coverage
covr::package_coverage()

Building Documentation

# Generate documentation
devtools::document()

# Build vignettes
devtools::build_vignettes()

# Preview package website
pkgdown::build_site()

Quality Checks

# Run R CMD check
devtools::check()

# Check package with more stringent CRAN checks
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))

# Lint code
lintr::lint_package()

# Style code
styler::style_pkg()

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

To cite this package, please use:

citation("myrpackage")

About

A starter R package scaffold, structured for publication on CRAN, with boilerplate files and metadata to begin development immediately.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages