Skip to contents

Generates a new data frame according to the formula provided.

Usage

formatting(
  data_frame,
  formula,
  tz = "UTC",
  format = "%Y-%m-%d %H:%M:%S",
  user = "",
  study = "",
  home = "",
  room = ""
)

Arguments

data_frame

a data frame

formula

a formula describing the specific layout of the data frame

tz

a time zone like "UTC", "MET", ...

format

the format in which the time stamps are given in the data frame

user

abbreviation for the name of the respective scientist

study

a natural number (entered as a character)

home

a natural number (entered as a character)

room

abbreviation for the name of the respective room

Value

Returns a data frame that has a specific format according to the formula provided

Details

The function adds columns referring to the specific season and time of day (tod) for each time stamp. Variables will be on the left side, the date terms on the right including season and tod as well as other mandatory variables (home, room, etc.). If additional variables were given, these can also be found in the output.

If a mandatory variable is not present in the output, a message is issued. Furthermore, the evaluate function of annex cannot be used unless all the required variables are available. If the formula passed contains more than just the mandatory variables, the evaluate function of annex can be used without any problems.

The output contains at least seven columns in addition to the columns for the respective variables.