A friendly R package that provides greeting and farewell functions in multiple languages.
You can install the development version of myrpackage from GitHub with:
# install.packages("devtools")
devtools::install_github("DiogoRibeiro7/myrpackage")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.- π 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
- English (default)
- Spanish
- French
- Portuguese
- German
- Italian
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)
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
- Clone the repository
- Open the project in RStudio or your preferred R environment
- Install development dependencies with
devtools::install_dev_deps()
# Run tests
devtools::test()
# Check test coverage
covr::package_coverage()# Generate documentation
devtools::document()
# Build vignettes
devtools::build_vignettes()
# Preview package website
pkgdown::build_site()# 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()Contributions are welcome! Please see CONTRIBUTING.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
To cite this package, please use:
citation("myrpackage")