From 18df36d7f014e3a52d2ecb33a70cb1b31927c22f Mon Sep 17 00:00:00 2001 From: parmsam Date: Tue, 30 Apr 2024 23:07:39 -0400 Subject: [PATCH] prepare for release --- .Rbuildignore | 1 + DESCRIPTION | 14 +++++--------- R/lzstringr-package.R | 14 ++++---------- README.Rmd | 6 ++++++ README.md | 6 ++++++ cran-comments.md | 5 +++++ man/compressToBase64.Rd | 2 -- man/compressToEncodedURIComponent.Rd | 2 -- man/decompressFromBase64.Rd | 5 ++--- man/decompressFromEncodedURIComponent.Rd | 5 ++--- 10 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index dcbcf4b..544bb70 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,4 @@ ^docs$ ^pkgdown$ ^vignettes/articles$ +^cran-comments\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index 0f81fee..f4994a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,9 @@ Package: lzstring Type: Package -Title: An R wrapper of lzstring C++ library +Title: Wrapper for 'lz-string' C++ Library Version: 0.1.0 -Author: Sam Parmar -Maintainer: Sam Parmar -Description: R interface to the lz-string C++ library, enabling LZ-based - compression and decompression of strings directly within R. Useful for - reducing the memory footprint of large strings or transmitting - compressed data. +Description: Provide access to the 'lz-string' C++ library for LZ-based + compression and decompression of strings. License: MIT + file LICENSE Encoding: UTF-8 LazyData: true @@ -16,13 +12,13 @@ LinkingTo: Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 URL: https://parmsam.github.io/lzstring-r/, https://github.com/parmsam/lzstring-r Authors@R: c( person( given = "Sam", family = "Parmar", - role = c("aut", "cre") + role = c("aut", "cre"), email = "parmartsam@gmail.com" ), person( diff --git a/R/lzstringr-package.R b/R/lzstringr-package.R index dea1e85..d800f61 100644 --- a/R/lzstringr-package.R +++ b/R/lzstringr-package.R @@ -82,9 +82,7 @@ safe_decompress <- function(string, f) { #' @return A character string representing the compressed input string in Base64 format. #' @export #' @examples -#' \dontrun{ #' compressToBase64("Hello, world!") -#' } compressToBase64 <- function(string) { stopifnot( "`string` must be a character." = is.character(string), @@ -101,9 +99,8 @@ compressToBase64 <- function(string) { #' @return A character string representing the decompressed input string. #' @export #' @examples -#' \dontrun{ -#' decompressFromBase64(compressed_string) -#' } +#' x <- compressToBase64("Hello, world!") +#' decompressFromBase64(x) decompressFromBase64 <- function(string) { stopifnot( "`string` must be a character." = is.character(string), @@ -120,9 +117,7 @@ decompressFromBase64 <- function(string) { #' @return A character string representing the compressed input string in Encoded URI Component format. #' @export #' @examples -#' \dontrun{ #' compressToEncodedURIComponent("Hello, world!") -#' } compressToEncodedURIComponent <- function(string) { stopifnot( "`string` must be a character." = is.character(string), @@ -139,9 +134,8 @@ compressToEncodedURIComponent <- function(string) { #' @return A character string representing the decompressed input string. #' @export #' @examples -#' \dontrun{ -#' decompressFromEncodedURIComponent(compressed_string) -#' } +#' x <- compressToEncodedURIComponent("Hello, world!") +#' decompressFromEncodedURIComponent(x) decompressFromEncodedURIComponent <- function(string) { stopifnot( "`string` must be a character." = is.character(string), diff --git a/README.Rmd b/README.Rmd index 1103809..45847cf 100644 --- a/README.Rmd +++ b/README.Rmd @@ -26,6 +26,12 @@ The goal of lzstring-r is to provide an R wrapper for the [lzstring C++ library] ## Installation +You can install the released version of lzstringr from CRAN with: + +``` r +install.packages("lzstringr") +``` + You can install the development version of lzstringr from [GitHub](https://github.com/) with: ``` r diff --git a/README.md b/README.md index e670089..749c5a9 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ lzstring in JavaScript—peek at his work over ## Installation +You can install the released version of lzstringr from CRAN with: + +``` r +install.packages("lzstringr") +``` + You can install the development version of lzstringr from [GitHub](https://github.com/) with: diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..858617d --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,5 @@ +## R CMD check results + +0 errors | 0 warnings | 1 note + +* This is a new release. diff --git a/man/compressToBase64.Rd b/man/compressToBase64.Rd index 481d40c..0d90c79 100644 --- a/man/compressToBase64.Rd +++ b/man/compressToBase64.Rd @@ -16,7 +16,5 @@ A character string representing the compressed input string in Base64 format. This function takes a string as input and returns a compressed version of the string in Base64 format. } \examples{ -\dontrun{ compressToBase64("Hello, world!") } -} diff --git a/man/compressToEncodedURIComponent.Rd b/man/compressToEncodedURIComponent.Rd index e1bdc4d..cdd7942 100644 --- a/man/compressToEncodedURIComponent.Rd +++ b/man/compressToEncodedURIComponent.Rd @@ -16,7 +16,5 @@ A character string representing the compressed input string in Encoded URI Compo This function takes a string as input and returns a compressed version of the string in Encoded URI Component format. } \examples{ -\dontrun{ compressToEncodedURIComponent("Hello, world!") } -} diff --git a/man/decompressFromBase64.Rd b/man/decompressFromBase64.Rd index a97d0db..fef86c4 100644 --- a/man/decompressFromBase64.Rd +++ b/man/decompressFromBase64.Rd @@ -16,7 +16,6 @@ A character string representing the decompressed input string. This function takes a compressed string in Base64 format as input and returns the decompressed version of the string. } \examples{ -\dontrun{ -decompressFromBase64(compressed_string) -} +x <- compressToBase64("Hello, world!") +decompressFromBase64(x) } diff --git a/man/decompressFromEncodedURIComponent.Rd b/man/decompressFromEncodedURIComponent.Rd index 958ece4..6f0461f 100644 --- a/man/decompressFromEncodedURIComponent.Rd +++ b/man/decompressFromEncodedURIComponent.Rd @@ -16,7 +16,6 @@ A character string representing the decompressed input string. This function takes a compressed string in Encoded URI Component format as input and returns the decompressed version of the string. } \examples{ -\dontrun{ -decompressFromEncodedURIComponent(compressed_string) -} +x <- compressToEncodedURIComponent("Hello, world!") +decompressFromEncodedURIComponent(x) }