In case you just want to hear a meow either apropos nothing or at the end of execution of some code to let you know that the execution is complete, just include this line of code:
If you have a kitty meow that you like and would like to include in the package, please either make a PR or e-mail it to me and I will include it.
This package was inspired by pupR package by Melissa Innerst. Thanks are due to my lab buddy Jonathan Phillips for suggesting including meowR function as a replacement for beepR.
May these kitties bring some joy and amusement during your stressful data digging jobs!
diff --git a/docs/reference/kittyR-1.png b/docs/reference/kittyR-1.png
index 44ebb85..0311101 100644
Binary files a/docs/reference/kittyR-1.png and b/docs/reference/kittyR-1.png differ
diff --git a/docs/reference/kittyR-2.png b/docs/reference/kittyR-2.png
index 9b36ac3..0b31f6f 100644
Binary files a/docs/reference/kittyR-2.png and b/docs/reference/kittyR-2.png differ
diff --git a/docs/reference/kittyR-3.png b/docs/reference/kittyR-3.png
new file mode 100644
index 0000000..fbf822b
Binary files /dev/null and b/docs/reference/kittyR-3.png differ
diff --git a/docs/reference/kittyR.html b/docs/reference/kittyR.html
index d4d5447..ba4785a 100644
--- a/docs/reference/kittyR.html
+++ b/docs/reference/kittyR.html
@@ -16,7 +16,8 @@
-
+
+
@@ -37,6 +38,8 @@
Currently, the images are collected from the following sources-
https://pixabay.com/en/photos/cat/
https://www.pexels.com/search/cat/
+https://pixabay.com/en/photos/kitten/
+https://www.pexels.com/search/kitten/
The sound files come from the following CC BY 3.0 source:
http://soundbible.com/suggest.php?q=cat+meow&x=0&y=0" />
@@ -87,7 +90,7 @@
diff --git a/man/figures/README-kittyR-1.png b/man/figures/README-kittyR-1.png
index ee30a58..ad189f7 100644
Binary files a/man/figures/README-kittyR-1.png and b/man/figures/README-kittyR-1.png differ
diff --git a/man/figures/README-kittyR1-1.png b/man/figures/README-kittyR1-1.png
new file mode 100644
index 0000000..40033dd
Binary files /dev/null and b/man/figures/README-kittyR1-1.png differ
diff --git a/man/figures/README-kittyR2-1.png b/man/figures/README-kittyR2-1.png
new file mode 100644
index 0000000..217974a
Binary files /dev/null and b/man/figures/README-kittyR2-1.png differ
diff --git a/man/kittyR.Rd b/man/kittyR.Rd
index 435803c..e374aac 100644
--- a/man/kittyR.Rd
+++ b/man/kittyR.Rd
@@ -4,7 +4,8 @@
\alias{kittyR}
\title{Cats in R console.}
\usage{
-kittyR(url = NULL, meow = TRUE, sound = 3)
+kittyR(url = NULL, meow = TRUE, sound = 3, only_kitten = FALSE,
+ ...)
}
\arguments{
\item{url}{URL for the source from which individual image URLs are to be
@@ -18,6 +19,11 @@ picture of a cat.}
played by either specifying one of the built in sounds, specifying the path
to a \code{.wav} file or specifying an url. There are currently 6 meows
included. The default is \code{3}.}
+
+\item{only_kitten}{Logical that decides whether only kitten pics should be
+selected (default: \code{FALSE}).}
+
+\item{...}{Additional arguments (currently ignored).}
}
\value{
A photo of a cat is downloaded and displayed in the plot window.
@@ -29,18 +35,24 @@ Currently, the images are collected from the following sources-
\enumerate{
\item \url{https://pixabay.com/en/photos/cat/}
\item \url{https://www.pexels.com/search/cat/}
+\item \url{https://pixabay.com/en/photos/kitten/}
+\item \url{https://www.pexels.com/search/kitten/}
}
The sound files come from the following CC BY 3.0 source:
\url{http://soundbible.com/suggest.php?q=cat+meow&x=0&y=0}
}
\examples{
# relying on default collection
-set.seed(3444)
+set.seed(122)
kittyR::kittyR(meow = FALSE)
-# proving a custom URL
+# in case you want only pics of kittens
+set.seed(111)
+kittyR::kittyR(meow = FALSE, only_kitten = TRUE)
+
+# provide a custom URL
kittyR::kittyR(
- url = "https://www.pexels.com/search/cat/",
+ url = "https://visualhunt.com/photos/cat/",
meow = FALSE
)
}
diff --git a/tests/testthat/test_kitty_pics_df.R b/tests/testthat/test_kitty_pics_df.R
index 4f9875d..4f08746 100644
--- a/tests/testthat/test_kitty_pics_df.R
+++ b/tests/testthat/test_kitty_pics_df.R
@@ -12,7 +12,7 @@ testthat::test_that(
df2 <- kittyR::kitty_pics_df(url = "https://www.pexels.com/search/cat/")
testthat::expect_equal(dim(df1), c(184L, 3L))
- testthat::expect_equal(dim(df2), c(33L, 3L))
+ testthat::expect_equal(dim(df2), c(36L, 3L))
testthat::expect_is(df1, "tbl_df")
}
)