From 1fccf334043cc3eab6ad83ced119f18ea70d3aa1 Mon Sep 17 00:00:00 2001 From: Felix MIL Date: Wed, 20 Sep 2023 14:14:18 +0200 Subject: [PATCH] devtools::document(roclets = c('rd', 'collate', 'namespace')) --- NAMESPACE | 6 +++--- man/extractYaml.Rd | 17 +++++++++++++++++ man/getYamlStartEnd.Rd | 20 ++++++++++++++++++++ man/newReport.Rd | 34 ++++++++++++++++++++++++++++++++++ man/new_report.Rd | 19 ------------------- man/replaceYaml.Rd | 16 ++++++++++++++++ 6 files changed, 90 insertions(+), 22 deletions(-) create mode 100644 man/extractYaml.Rd create mode 100644 man/getYamlStartEnd.Rd create mode 100644 man/newReport.Rd delete mode 100644 man/new_report.Rd create mode 100644 man/replaceYaml.Rd diff --git a/NAMESPACE b/NAMESPACE index 59cd9e2..11a003c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,5 @@ # Generated by roxygen2: do not edit by hand -export(get_yaml_start_end) -export(new_report) -export(replace_yaml) +export(getYamlStartEnd) +export(newReport) +export(replaceYaml) diff --git a/man/extractYaml.Rd b/man/extractYaml.Rd new file mode 100644 index 0000000..7a98168 --- /dev/null +++ b/man/extractYaml.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/yaml-handler.R +\name{extractYaml} +\alias{extractYaml} +\title{Get YAML header from a text vector} +\usage{ +extractYaml(text) +} +\arguments{ +\item{text}{a vector of string the text read from a file} +} +\value{ +a list representing the yaml that can be exported back to yaml format +} +\description{ +Get YAML header from a text vector +} diff --git a/man/getYamlStartEnd.Rd b/man/getYamlStartEnd.Rd new file mode 100644 index 0000000..aa3ab85 --- /dev/null +++ b/man/getYamlStartEnd.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/yaml-handler.R +\name{getYamlStartEnd} +\alias{getYamlStartEnd} +\title{Identify where the yaml header starts and end in a file} +\usage{ +getYamlStartEnd(text, only_content = TRUE) +} +\arguments{ +\item{text}{a string vector containing the read lines of a file} + +\item{only_content}{a logical defining if the returned index should be for +the yaml delimiters or the yaml content.} +} +\value{ +a numeric vector of size two representing the index +} +\description{ +Identify where the yaml header starts and end in a file +} diff --git a/man/newReport.Rd b/man/newReport.Rd new file mode 100644 index 0000000..494e863 --- /dev/null +++ b/man/newReport.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/new-report.R +\name{newReport} +\alias{newReport} +\title{Create a new report} +\usage{ +newReport( + report_title, + path = "Reports/", + template = "report", + subtitle = NA, + author = NA, + datetime = NA +) +} +\arguments{ +\item{path}{a string that represent the path where to create the report.} + +\item{template}{one string (either \code{report} or \code{tutorial}) representing the type of template to initialize.} + +\item{subtitle}{the subtitle of the report. empty by default.} + +\item{author}{the name of the author(s). "esqlabs Gmbh" by default.} + +\item{datetime}{the date time that will appear on the report in "YYYY-MM-DD HH:MM:SS" format. default to time of generation of the report.} + +\item{file_name}{a string that represent the name of the report that will be created.} +} +\description{ +Create a new report +} +\examples{ +newReport("my_report", "report_folder/") +} diff --git a/man/new_report.Rd b/man/new_report.Rd deleted file mode 100644 index 6537bb9..0000000 --- a/man/new_report.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/new_report.R -\name{new_report} -\alias{new_report} -\title{Create a new report} -\usage{ -new_report(file_name, path = NA) -} -\arguments{ -\item{file_name}{a string that represent the name of the report that will be created.} - -\item{path}{a string that represent the path where to create the report.} -} -\description{ -Create a new report -} -\examples{ -new_report("my_report", "report_folder/") -} diff --git a/man/replaceYaml.Rd b/man/replaceYaml.Rd new file mode 100644 index 0000000..32288f0 --- /dev/null +++ b/man/replaceYaml.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/yaml-handler.R +\name{replaceYaml} +\alias{replaceYaml} +\title{Replace yaml header of a file} +\usage{ +replaceYaml(file_path, new_yaml) +} +\arguments{ +\item{file_path}{a string representing the file containing the yaml header to replace.} + +\item{new_yaml}{a list representing the yaml header to inject} +} +\description{ +Replace yaml header of a file +}