diff --git a/DESCRIPTION b/DESCRIPTION
index cebe8443..1d3ed2d5 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -20,7 +20,7 @@ Encoding: UTF-8
LazyData: true
biocViews:
Roxygen: list(markdown = TRUE)
-RoxygenNote: 7.2.3
+RoxygenNote: 7.3.1
Depends:
R (>= 4.0)
Imports:
diff --git a/R/pick_phylopic.R b/R/pick_phylopic.R
index 889c7119..2cb67db9 100644
--- a/R/pick_phylopic.R
+++ b/R/pick_phylopic.R
@@ -75,8 +75,10 @@ pick_phylopic <- function(name = NULL, n = 5, uuid = NULL, view = 1,
grid.newpage()
grid.picture(img)
# Add text for attribution
+ att <- att[[1]][[1]]
att_string <- paste0("Contributor: ", att$contributor, "\n",
"Created: ", att$created, "\n",
+ "Attribution: ", att$attribution, "\n",
"License: ", att$license)
grid.text(label = att_string,
x = 0.96, y = 0.92,
@@ -126,6 +128,7 @@ pick_phylopic <- function(name = NULL, n = 5, uuid = NULL, view = 1,
}
# Get attribution data
att <- lapply(uuids[[i]], get_attribution)
+ att <- lapply(att, function(x) x[[1]][[1]])
# Attribution text
n_spaces <- 3 + floor(log10(length(att) + 1))
att_string <- lapply(att, function(x) {
diff --git a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-img.svg b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-img.svg
index 04689c4e..8f31e562 100644
--- a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-img.svg
+++ b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-img.svg
@@ -69,7 +69,6 @@
y
name
-
@@ -81,7 +80,6 @@
-
diff --git a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-larger-glyphs.svg b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-larger-glyphs.svg
index d2dc1267..88c3c815 100644
--- a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-larger-glyphs.svg
+++ b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-larger-glyphs.svg
@@ -18,7 +18,7 @@
-
+
@@ -69,7 +69,6 @@
y
name
-
@@ -81,7 +80,6 @@
-
diff --git a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-uuid.svg b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-uuid.svg
index 8bc4ada0..1a5bfd14 100644
--- a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-uuid.svg
+++ b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph-with-uuid.svg
@@ -69,7 +69,6 @@
y
name
-
@@ -81,7 +80,6 @@
-
diff --git a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph.svg b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph.svg
index f2f40d6d..9a96168a 100644
--- a/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph.svg
+++ b/tests/testthat/_snaps/geom_phylopic/phylopic-key-glyph.svg
@@ -69,7 +69,6 @@
y
name
-
@@ -81,7 +80,6 @@
-