diff --git a/R/knitr_engine.R b/R/knitr_engine.R index 31c5d24..ab045a1 100644 --- a/R/knitr_engine.R +++ b/R/knitr_engine.R @@ -37,7 +37,7 @@ set_neo4j_engine <- function(neo4j_home, knit_engines$set(neo4j = function(options) { if (options$eval) { - options$code <- clean_input(options$code) + options$code_to_eval <- clean_input(options$code) out <- encypher_for_knitr(options) #out <- options$code } diff --git a/R/utils.R b/R/utils.R index c7ebf70..53f2993 100644 --- a/R/utils.R +++ b/R/utils.R @@ -18,20 +18,20 @@ encypher_for_knitr <- function(options){ # Sequencially send the code if multiple calls are given (for windows compatibility) if (is.null(options$neo4j_passwd)){ - for (i in seq_along(options$code)){ + for (i in seq_along(options$code_to_eval)){ write( system( - glue("{options$cypher_bin} -a {options$neo4j_adress} --format {options$neo4j_format} {shQuote(options$code[[i]])}"), + glue("{options$cypher_bin} -a {options$neo4j_adress} --format {options$neo4j_format} {shQuote(options$code_to_eval[[i]])}"), intern = TRUE), file = t, append = TRUE ) } } else { - for (i in seq_along(options$code)){ + for (i in seq_along(options$code_to_eval)){ write( system( - glue("{options$cypher_bin} -a {options$neo4j_adress} -u {options$neo4j_user} -p {options$neo4j_passwd} --format {options$neo4j_format} {shQuote(options$code[[i]])}"), + glue("{options$cypher_bin} -a {options$neo4j_adress} -u {options$neo4j_user} -p {options$neo4j_passwd} --format {options$neo4j_format} {shQuote(options$code_to_eval[[i]])}"), intern = TRUE), file = t, append = TRUE