append_to_data: append_to_data

Description Usage Arguments Value Examples

View source: R/data.R

Description

append_to_data

Usage

1
2
3
4
5
6
append_to_data(
  dataframe,
  Date = as.character(format(Sys.Date(), "%d-%m-%Y")),
  Hour = substr(Sys.time(), 12, 16),
  ...
)

Arguments

dataframe

The dataframe to append data to

Date

The date at which the event happened. Format dd-mm-yyy

Hour

The hour at which the event happened. Format hh:mm

...

the data to append. It has to be named and to be related to the different names

Value

new data frame with new rows

Examples

1
2
3
4
dummy_data <- utils::read.csv(file.path(system.file("extdata", package = "NewBoRn"),
"dummy_data.csv"))
dummy_data <- dplyr::select(.data = dummy_data, -X)
append_to_data(dataframe = dummy_data, Lactation_Left = TRUE, Temperature = 37.2)

jcorain/NewBoRn documentation built on Feb. 2, 2021, 11:50 a.m.