Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MIRACUM
misc
DIZtools
Commits
f5c9143e
Commit
f5c9143e
authored
3 years ago
by
Jonathan Mang
Browse files
Options
Download
Email Patches
Plain Diff
docs: updated spelling
parent
e8f923b8
main
dev
v1.0.1
v1.0.0
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
No related merge requests found
Pipeline
#36109
failed with stages
in 3 minutes and 44 seconds
Changes
22
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
.Rbuildignore
+4
-2
.Rbuildignore
.gitignore
+4
-1
.gitignore
DESCRIPTION
+1
-2
DESCRIPTION
NEWS.md
+1
-0
NEWS.md
R/assign_to_R_env.R
+1
-1
R/assign_to_R_env.R
R/equals2.R
+1
-1
R/equals2.R
R/feedback.R
+4
-4
R/feedback.R
R/get_current_timestamp.R
+4
-4
R/get_current_timestamp.R
R/is_date_format.R
+2
-1
R/is_date_format.R
R/setdiff_all.R
+1
-1
R/setdiff_all.R
data-raw/devstuffs.R
+9
-1
data-raw/devstuffs.R
man/assign_to_R_env.Rd
+1
-1
man/assign_to_R_env.Rd
man/cleanup_old_logfile.Rd
+1
-1
man/cleanup_old_logfile.Rd
man/equals2.Rd
+1
-1
man/equals2.Rd
man/feedback.Rd
+2
-2
man/feedback.Rd
man/feedback_get_formatted_string.Rd
+3
-3
man/feedback_get_formatted_string.Rd
man/feedback_to_console.Rd
+2
-2
man/feedback_to_console.Rd
man/feedback_to_logfile.Rd
+2
-2
man/feedback_to_logfile.Rd
man/get_current_timestamp.Rd
+4
-4
man/get_current_timestamp.Rd
man/is_date_format.Rd
+2
-1
man/is_date_format.Rd
with
50 additions
and
35 deletions
+50
-35
.Rbuildignore
+
4
-
2
View file @
f5c9143e
^## --------------$
^## This file is auto generated\.$
^## Please apply changes in `\./data-raw/devstuffs\.R`!$
^## -------------$
^LICENSE\.md$
^\.gitlab-ci\.yml$
^data-raw$
...
...
@@ -11,5 +15,3 @@
^NEWS\.md$
^CRAN-RELEASE$
^CRAN-SUBMISSION$
^.*\.Rproj$
^\.Rproj\.user$
This diff is collapsed.
Click to expand it.
.gitignore
+
4
-
1
View file @
f5c9143e
## --------------
## This file is auto generated.
## Please apply changes in `./data-raw/devstuffs.R`!
## -------------
/*
/*/
*.log
...
...
@@ -23,4 +27,3 @@
!/.github/
!/NEWS.md
!/cran-comments.md
.Rproj.user
This diff is collapsed.
Click to expand it.
DESCRIPTION
+
1
-
2
View file @
f5c9143e
Package: DIZtools
Title: Lightweight Utilities for 'DIZ' R Package Development
Version: 0.0.0.901
1
Version: 0.0.0.901
2
Date: 2022-02-07
Authors@R: c(
person("Jonathan M.", "Mang", , "jonathan.mang@uk-erlangen.de", role = c("aut", "cre"),
...
...
@@ -32,4 +32,3 @@ Suggests:
testthat
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.1.2
This diff is collapsed.
Click to expand it.
NEWS.md
+
1
-
0
View file @
f5c9143e
...
...
@@ -18,6 +18,7 @@
*
changed
`feedback()`
to
`log()`
#### Docs
*
updated news.md
*
updated rep2 function which was ahead in dizutils
#### Others
...
...
This diff is collapsed.
Click to expand it.
R/assign_to_R_env.R
+
1
-
1
View file @
f5c9143e
...
...
@@ -18,7 +18,7 @@
#' @description Hack variable into global env (bypasses R CMD checks).
#' This does create a new variable in the R environment but NOT a new
#' variable in the system environment. To create a system environment
#' variable be
e
ing accessible via `Sys.getenv(...)`, use the function
#' variable being accessible via `Sys.getenv(...)`, use the function
#' `DIZtools::setenv2(key = "varname", val = 7)`.
#' Old function name: `global_env_hack()`
#'
...
...
This diff is collapsed.
Click to expand it.
R/equals2.R
+
1
-
1
View file @
f5c9143e
...
...
@@ -19,7 +19,7 @@
#' @description The base-R function `==` is not working in an intended
#' way for NAs and boolean. This function fixes this.
#'
#' @references
<
http://www.cookbook-r.com/Manipulating_data/
#' @references
\url{
http://www.cookbook-r.com/Manipulating_data/
}
#' Comparing_vectors_or_factors_with_NA/>
#'
#' @param v1 First vector or element
...
...
This diff is collapsed.
Click to expand it.
R/feedback.R
+
4
-
4
View file @
f5c9143e
...
...
@@ -53,8 +53,8 @@
#' Recommended with length 10.
#' String to find the message in the code.
#' E.g. 10-digit random hex from
#'
(<
https://www.browserling.com/tools/random-hex
>)
or
#'
(<
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
>)
#'
\url{
https://www.browserling.com/tools/random-hex
}
or
#'
\url{
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
}
#' @param logfile_dir (Optional, String, default: "tempdir()")
#' The absolute path to folder where the logfile will be stored.
#' @param headless (Optional, Boolean, default: TRUE)
...
...
@@ -360,7 +360,7 @@ feedback_to_logfile <-
#' @title Format the feedback string
#' @description Helper function for the feedback function to combine the input
#' parameters in proper manner to
g
e a pretty and informative string which
#' parameters in proper manner to
b
e a pretty and informative string which
#' than can be added to the logfile and/or be displayed in the console.
#' CAUTION: 'print_this' must be of length 1! For arrays loop through them
#' by hand and call this function several times!
...
...
@@ -391,7 +391,7 @@ feedback_get_formatted_string <-
#' @title Archives the current logfile and creates a new blank one.
#' @description This function is called once at the beginning of the
#' runtime of the tool. It checks whether there is an old logfile
#' and renames it (if existing) to "logfile_20
xx-xx-xx-xxxxxx
.log".
#' and renames it (if existing) to "logfile_20
yy-mm-dd-HHMMSS
.log".
#' Then a new, empty, logfile "logfile.log" is created.
#'
#' @inheritParams feedback
...
...
This diff is collapsed.
Click to expand it.
R/get_current_timestamp.R
+
4
-
4
View file @
f5c9143e
...
...
@@ -14,14 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#' @title Quickly get the current timestamp
#' @title Quickly get the current time
stamp
#'
#' @description Function to quickly get the current timestamp without
#' @description Function to quickly get the current time
stamp without
#' need to handle format-options etc.
#'
#' @param no_spaces Boolean. Default = `FALSE`. Specifies wether the output
#' @param no_spaces Boolean. Default = `FALSE`. Specifies w
h
ether the output
#' can contain spaces or not. E.g. if the output is for human reading,
#' `no_spaces = FALSE` is a good option. As suffix for filenames
#' `no_spaces = FALSE` is a good option. As suffix for file
names
#' (e.g. logfiles), `no_spaces = TRUE` might be a good option.
#' @return The current timestamp in always the same format.
#'#'
...
...
This diff is collapsed.
Click to expand it.
R/is_date_format.R
+
2
-
1
View file @
f5c9143e
...
...
@@ -19,7 +19,8 @@
#' @description Checks if a string matches a given date format.
#'
#' @param date The list applied from rv$restricting_date
#' @param format The format paramters. See `?strptime` for parameter infos.
#' @param format The format parameters. See \code{?strptime}
#' for parameter info.
#'
#' @return TRUE/FALSE
#'
...
...
This diff is collapsed.
Click to expand it.
R/setdiff_all.R
+
1
-
1
View file @
f5c9143e
...
...
@@ -22,7 +22,7 @@
#' elements not contained in the second are in the resulting vector.
#' So if you also want in include all elements being in the second vector
#' but not in the first, you can use this function. In this case you are
#' searching for elements be
e
ing in the union of both vectors but not
#' searching for elements being in the union of both vectors but not
#' in the intersect of both vectors. This function is a symmetric function.
#' It doesn't matter in which order you input the vectors, the content
#' will be the same. Only the order of the elements inside the output
...
...
This diff is collapsed.
Click to expand it.
data-raw/devstuffs.R
+
9
-
1
View file @
f5c9143e
...
...
@@ -32,7 +32,7 @@ my_desc$set_authors(c(
my_desc
$
del
(
"Maintainer"
)
my_desc
$
del
(
"LazyData"
)
# Set the version
my_desc
$
set_version
(
"0.0.0.901
1
"
)
my_desc
$
set_version
(
"0.0.0.901
2
"
)
# The title of your package
my_desc
$
set
(
Title
=
"Lightweight Utilities for 'DIZ' R Package Development"
)
# The description of your package
...
...
@@ -116,6 +116,10 @@ fn <- ".Rbuildignore"
if
(
file.exists
(
fn
))
{
file.remove
(
fn
)
}
usethis
::
use_build_ignore
(
"## --------------"
)
usethis
::
use_build_ignore
(
"## This file is auto generated."
)
usethis
::
use_build_ignore
(
"## Please apply changes in `./data-raw/devstuffs.R`!"
)
usethis
::
use_build_ignore
(
"## -------------"
)
usethis
::
use_build_ignore
(
"LICENSE.md"
)
usethis
::
use_build_ignore
(
".gitlab-ci.yml"
)
usethis
::
use_build_ignore
(
"data-raw"
)
...
...
@@ -136,6 +140,10 @@ fn <- ".gitignore"
if
(
file.exists
(
fn
))
{
file.remove
(
fn
)
}
usethis
::
use_git_ignore
(
"## --------------"
)
usethis
::
use_git_ignore
(
"## This file is auto generated."
)
usethis
::
use_git_ignore
(
"## Please apply changes in `./data-raw/devstuffs.R`!"
)
usethis
::
use_git_ignore
(
"## -------------"
)
usethis
::
use_git_ignore
(
"/*"
)
usethis
::
use_git_ignore
(
"/*/"
)
usethis
::
use_git_ignore
(
"*.log"
)
...
...
This diff is collapsed.
Click to expand it.
man/assign_to_R_env.Rd
+
1
-
1
View file @
f5c9143e
...
...
@@ -20,7 +20,7 @@ No return value, called for side effects (see description).
Hack variable into global env (bypasses R CMD checks).
This does create a new variable in the R environment but NOT a new
variable in the system environment. To create a system environment
variable be
e
ing accessible via `Sys.getenv(...)`, use the function
variable being accessible via `Sys.getenv(...)`, use the function
`DIZtools::setenv2(key = "varname", val = 7)`.
Old function name: `global_env_hack()`
}
...
...
This diff is collapsed.
Click to expand it.
man/cleanup_old_logfile.Rd
+
1
-
1
View file @
f5c9143e
...
...
@@ -16,7 +16,7 @@ No return value, called for side effects (see description)
\description{
This function is called once at the beginning of the
runtime of the tool. It checks whether there is an old logfile
and renames it (if existing) to "logfile_20
xx-xx-xx-xxxxxx
.log".
and renames it (if existing) to "logfile_20
yy-mm-dd-HHMMSS
.log".
Then a new, empty, logfile "logfile.log" is created.
}
\examples{
...
...
This diff is collapsed.
Click to expand it.
man/equals2.Rd
+
1
-
1
View file @
f5c9143e
...
...
@@ -43,6 +43,6 @@ The base-R function `==` is not working in an intended
}
\references{
<
http://www.cookbook-r.com/Manipulating_data/
\url{
http://www.cookbook-r.com/Manipulating_data/
}
Comparing_vectors_or_factors_with_NA/>
}
This diff is collapsed.
Click to expand it.
man/feedback.Rd
+
2
-
2
View file @
f5c9143e
...
...
@@ -53,8 +53,8 @@ Same like prefix but at the end of each line.}
Recommended with length 10.
String to find the message in the code.
E.g. 10-digit random hex from
(<
https://www.browserling.com/tools/random-hex
>)
or
(<
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
>)
}
\url{
https://www.browserling.com/tools/random-hex
}
or
\url{
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
}
}
\item{logfile_dir}{(Optional, String, default: "tempdir()")
The absolute path to folder where the logfile will be stored.}
...
...
This diff is collapsed.
Click to expand it.
man/feedback_get_formatted_string.Rd
+
3
-
3
View file @
f5c9143e
...
...
@@ -16,8 +16,8 @@ E.g. "Warning", "Error". Default: "Info"}
Recommended with length 10.
String to find the message in the code.
E.g. 10-digit random hex from
(<
https://www.browserling.com/tools/random-hex
>)
or
(<
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
>)
}
\url{
https://www.browserling.com/tools/random-hex
}
or
\url{
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
}
}
\item{prefix}{Prefix (Optional, String, default: "")
This is useful if print_this is an array/list.
...
...
@@ -32,7 +32,7 @@ Returns a properly an consistent formatted string containing
}
\description{
Helper function for the feedback function to combine the input
parameters in proper manner to
g
e a pretty and informative string which
parameters in proper manner to
b
e a pretty and informative string which
than can be added to the logfile and/or be displayed in the console.
CAUTION: 'print_this' must be of length 1! For arrays loop through them
by hand and call this function several times!
...
...
This diff is collapsed.
Click to expand it.
man/feedback_to_console.Rd
+
2
-
2
View file @
f5c9143e
...
...
@@ -25,8 +25,8 @@ E.g. "Warning", "Error". Default: "Info"}
Recommended with length 10.
String to find the message in the code.
E.g. 10-digit random hex from
(<
https://www.browserling.com/tools/random-hex
>)
or
(<
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
>)
}
\url{
https://www.browserling.com/tools/random-hex
}
or
\url{
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
}
}
\item{prefix}{Prefix (Optional, String, default: "")
This is useful if print_this is an array/list.
...
...
This diff is collapsed.
Click to expand it.
man/feedback_to_logfile.Rd
+
2
-
2
View file @
f5c9143e
...
...
@@ -16,8 +16,8 @@ E.g. "Warning", "Error". Default: "Info"}
Recommended with length 10.
String to find the message in the code.
E.g. 10-digit random hex from
(<
https://www.browserling.com/tools/random-hex
>)
or
(<
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
>)
}
\url{
https://www.browserling.com/tools/random-hex
}
or
\url{
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
}
}
\item{prefix}{Prefix (Optional, String, default: "")
This is useful if print_this is an array/list.
...
...
This diff is collapsed.
Click to expand it.
man/get_current_timestamp.Rd
+
4
-
4
View file @
f5c9143e
...
...
@@ -2,14 +2,14 @@
% Please edit documentation in R/get_current_timestamp.R
\name{get_current_timestamp}
\alias{get_current_timestamp}
\title{Quickly get the current timestamp}
\title{Quickly get the current time
stamp}
\usage{
get_current_timestamp(no_spaces = FALSE)
}
\arguments{
\item{no_spaces}{Boolean. Default = `FALSE`. Specifies wether the output
\item{no_spaces}{Boolean. Default = `FALSE`. Specifies w
h
ether the output
can contain spaces or not. E.g. if the output is for human reading,
`no_spaces = FALSE` is a good option. As suffix for filenames
`no_spaces = FALSE` is a good option. As suffix for file
names
(e.g. logfiles), `no_spaces = TRUE` might be a good option.}
}
\value{
...
...
@@ -17,7 +17,7 @@ The current timestamp in always the same format.
#'
}
\description{
Function to quickly get the current timestamp without
Function to quickly get the current time
stamp without
need to handle format-options etc.
}
\examples{
...
...
This diff is collapsed.
Click to expand it.
man/is_date_format.Rd
+
2
-
1
View file @
f5c9143e
...
...
@@ -9,7 +9,8 @@ is_date_format(date, format)
\arguments{
\item{date}{The list applied from rv$restricting_date}
\item{format}{The format paramters. See `?strptime` for parameter infos.}
\item{format}{The format parameters. See \code{?strptime}
for parameter info.}
}
\value{
TRUE/FALSE
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help