From 1950793e1873af256b3e939f273857b438454191 Mon Sep 17 00:00:00 2001 From: Polarolouis Date: Fri, 8 Mar 2024 14:32:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFixing=20issue=20with=20package=20i?= =?UTF-8?q?nstallation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rapport.Rnw | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rapport.Rnw b/rapport.Rnw index 5339b44..f0b8cf8 100644 --- a/rapport.Rnw +++ b/rapport.Rnw @@ -54,12 +54,16 @@ @ <<'libraries', include=FALSE>>= -necessary_packages <- c("phytools", "here") -install.packages(necessary_packages) +necessary_packages <- c("phytools", "phylotools", "here") +if (any(!(necessary_packages %in% installed.packages()))) { + install.packages(necessary_packages) +} require(phytools) require(phylotools) require(here) + + source(here("R","utils.R")) @