append_date_generated_line: Add new last row with the generated date

View source: R/append_date_generated_line.R

append_date_generated_lineR Documentation

Add new last row with the generated date

Description

Function to add new row with the generated date. Before the date a pretext can be set.

Usage

append_date_generated_line(
  data,
  pretext = "Datauttrekket er gjort",
  date = format(Sys.Date(), "%d/%m/%Y")
)

Arguments

data

[data.frame]
The data to which an additional row with the generate date should be added.

pretext

[character(1)]
The explaining text before the date value. Defaults to "Datauttrekket ble gjort".

date

[character(1)]
Date for generating the data. Defaults to Sys.Date.

Details

Two rows are added to the data frame, the first is empty, the second has the generated date in the first column.

Value

data.frame with two additional rows, one empty and one with the generated date in the first column.

Author(s)

Petter Hopp Petter.Hopp@vetinst.no

Examples

## Not run: 
# Add row with generated date using standard values
gris_virus_slaktegris_utvalg <- append_date_generated_line(gris_virus_slaktegris_utvalg)

## End(Not run)


NorwegianVeterinaryInstitute/OKplan documentation built on Dec. 20, 2024, 10:41 a.m.