From c465b228de2801e8450f143dde3a4402869c12da Mon Sep 17 00:00:00 2001 From: Edgar Manukyan Date: Mon, 9 Dec 2024 02:12:18 +0000 Subject: [PATCH] #107 refactor --- R/generate_code.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/generate_code.R b/R/generate_code.R index 31ab81e..70adf21 100644 --- a/R/generate_code.R +++ b/R/generate_code.R @@ -130,6 +130,7 @@ generate_one_topic_code <- function(topic, domain, spec) { tolower() map_topic <- paste0("\n\n# Map topic ", domain_topic, " ----\n") + assign_to_domain_topic <- paste0(domain_topic, " <-") # Generate the code for each variable row in spec spec_topic |> @@ -139,7 +140,7 @@ generate_one_topic_code <- function(topic, domain, spec) { .keep = "none" ) |> unlist() |> - append(paste0(domain_topic, " <-"), after = 0L) |> + append(assign_to_domain_topic, after = 0L) |> append(map_topic, after = 0L) }