Skip to content

Commit 83bb17d

Browse files
committed
fix: fix github actions
1 parent 7b5797f commit 83bb17d

File tree

4 files changed

+48
-26
lines changed

4 files changed

+48
-26
lines changed

DESCRIPTION

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Encoding: UTF-8
1010
LazyData: true
1111
Roxygen: list(markdown = TRUE)
1212
RoxygenNote: 7.3.0
13-
Suggests:
13+
Suggests:
1414
covr,
1515
knitr,
1616
lintr,
@@ -24,7 +24,5 @@ Config/testthat/edition: 3
2424
VignetteBuilder: knitr
2525
URL: https://github.com/DiogoRibeiro7/myrpackage, https://diogoribeiro7.github.io/myrpackage/
2626
BugReports: https://github.com/DiogoRibeiro7/myrpackage/issues
27-
Imports:
28-
lifecycle
29-
Depends:
27+
Depends:
3028
R (>= 3.5)

R/goodbye.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,39 @@ goodbye <- function(name = "world", language = "english", exclamation = TRUE) {
2323
if (!is.character(name) || length(name) != 1) {
2424
stop("'name' must be a single character string")
2525
}
26-
26+
2727
if (!is.character(language) || length(language) != 1) {
2828
stop("'language' must be a single character string")
2929
}
30-
30+
3131
if (!is.logical(exclamation) || length(exclamation) != 1) {
3232
stop("'exclamation' must be a single logical value")
3333
}
34-
34+
3535
# Select farewell based on language
3636
farewell <- switch(
3737
tolower(language),
3838
english = "Goodbye",
39-
spanish = "Adiós",
39+
spanish = "Adi\u00f3s", # Using Unicode escape for 'ó'
4040
french = "Au revoir",
4141
portuguese = "Adeus",
4242
# Default to English if language not supported
4343
"Goodbye"
4444
)
45-
45+
4646
# Construct the farewell
4747
result <- paste0(farewell, ", ", name)
48-
48+
4949
# Add exclamation mark if requested
5050
if (exclamation) {
5151
result <- paste0(result, "!")
5252
} else {
5353
result <- paste0(result, ".")
5454
}
55-
55+
5656
# Print the farewell and return it invisibly
5757
cat(result, "\n")
58-
58+
5959
# Return the farewell
6060
invisible(result)
6161
}

R/hello.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,39 @@ hello <- function(name = "world", language = "english", exclamation = TRUE) {
2323
if (!is.character(name) || length(name) != 1) {
2424
stop("'name' must be a single character string")
2525
}
26-
26+
2727
if (!is.character(language) || length(language) != 1) {
2828
stop("'language' must be a single character string")
2929
}
30-
30+
3131
if (!is.logical(exclamation) || length(exclamation) != 1) {
3232
stop("'exclamation' must be a single logical value")
3333
}
34-
34+
3535
# Select greeting based on language
3636
greeting <- switch(
3737
tolower(language),
3838
english = "Hello",
3939
spanish = "Hola",
4040
french = "Bonjour",
41-
portuguese = "Olá",
41+
portuguese = "Ol\u00e1", # Using Unicode escape for 'á'
4242
# Default to English if language not supported
4343
"Hello"
4444
)
45-
45+
4646
# Construct the greeting
4747
result <- paste0(greeting, ", ", name)
48-
48+
4949
# Add exclamation mark if requested
5050
if (exclamation) {
5151
result <- paste0(result, "!")
5252
} else {
5353
result <- paste0(result, ".")
5454
}
55-
55+
5656
# Print the greeting and return it invisibly
5757
cat(result, "\n")
58-
58+
5959
# Return the greeting
6060
invisible(result)
6161
}

man/hello.Rd

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
\name{hello}
2-
\alias{hello}
3-
\title{Say Hello}
4-
\usage{hello()}
5-
\description{This function prints a friendly greeting.}
6-
\examples{hello()}
1+
\name{goodbye}
2+
\alias{goodbye}
3+
\title{Say Goodbye}
4+
\usage{
5+
goodbye(name = "world", language = "english", exclamation = TRUE)
6+
}
7+
\arguments{
8+
\item{name}{Character string. The name to bid farewell to. Default is "world".}
9+
10+
\item{language}{Character string. The language for the farewell.
11+
Supported languages: "english" (default), "spanish", "french", "portuguese".}
12+
13+
\item{exclamation}{Logical. Whether to add an exclamation mark. Default is TRUE.}
14+
}
15+
\value{
16+
A character string containing the farewell message.
17+
}
18+
\description{
19+
This function prints a friendly farewell. It can be customized with
20+
different names and languages.
21+
}
22+
\examples{
23+
goodbye()
24+
goodbye("R Users")
25+
goodbye("amigos", language = "spanish")
26+
goodbye("mes amis", language = "french", exclamation = FALSE)
27+
}
28+
\seealso{
29+
\code{\link{hello}} for a greeting function
30+
}

0 commit comments

Comments
 (0)