Skip to content

Commit

Permalink
fix: solve path to images (inst/)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Apr 15, 2024
1 parent f493fe3 commit d2e8ec6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/monthly_calendar.R
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ monthly_calendar <- function(year = format(Sys.Date(), "%Y"),

if (calendar[i, "date"] %in% specials$"date") {

add_image(file = "inst/images/special.png",
add_image(file = system.file(file.path("images", "special.png"),
package = "planner"),
x = calendar[i, "x"] - (.91 + x_at),
y = calendar[i, "y"] - 0.90,
size = 1)
Expand Down Expand Up @@ -509,7 +510,8 @@ monthly_calendar <- function(year = format(Sys.Date(), "%Y"),

if (calendar[i, "date"] %in% moon_dates$"new_moon") {

add_image(file = "inst/images/new-moon.png",
add_image(file = system.file(file.path("images", "new-moon.png"),
package = "planner"),
x = calendar[i, "x"] - x_at,
y = calendar[i, "y"] - 0.10,
size = 1)
Expand All @@ -524,7 +526,8 @@ monthly_calendar <- function(year = format(Sys.Date(), "%Y"),

if (calendar[i, "date"] %in% moon_dates$"full_moon") {

add_image(file = "inst/images/full-moon.png",
add_image(file = system.file(file.path("images", "full-moon.png"),
package = "planner"),
x = calendar[i, "x"] - x_at,
y = calendar[i, "y"] - 0.10,
size = 1)
Expand All @@ -539,15 +542,17 @@ monthly_calendar <- function(year = format(Sys.Date(), "%Y"),

if (calendar[i, "date"] %in% moon_dates$"first_quarter") {

add_image(file = "inst/images/first-quarter.png",
add_image(file = system.file(file.path("images", "first-quarter.png"),
package = "planner"),
x = calendar[i, "x"] - x_at,
y = calendar[i, "y"] - 0.10,
size = 1)
}

if (calendar[i, "date"] %in% moon_dates$"third_quarter") {

add_image(file = "inst/images/third-quarter.png",
add_image(file = system.file(file.path("images", "third-quarter.png"),
package = "planner"),
x = calendar[i, "x"] - x_at,
y = calendar[i, "y"] - 0.10,
size = 1)
Expand Down

0 comments on commit d2e8ec6

Please sign in to comment.