Learn R Programming

ConSciR (version 0.3.0)

tidy_Meaco: Tidy Meaco sensor data

Description

This function takes raw Meaco sensor data and returns data with renamed columns.

Usage

tidy_Meaco(
  mydata,
  Site_col = "RECEIVER",
  Sensor_col = "TRANSMITTER",
  Date_col = "DATE",
  Temp_col = "TEMPERATURE",
  RH_col = "HUMIDITY"
)

Value

A tidied data frame with columns Site, Sensor, Date, Temp, and RH

Arguments

mydata

A data frame containing raw Meaco sensor data with columns RECEIVER, TRANSMITTER, DATE, TEMPERATURE, and HUMIDITY

Site_col

A string specifying the name of the column in `mydata` that contains location information. Default is "RECEIVER".

Sensor_col

A string specifying the name of the column in `mydata` that contains sensor information. Default is "TRANSMITTER".

Date_col

A string specifying the name of the column in `mydata` that contains date information. Default is "DATE".

Temp_col

A string specifying the name of the column in `mydata` that contains temperature data. Default is "TEMPERATURE".

RH_col

A string specifying the name of the column in `mydata` that contains relative humidity data. Default is "HUMIDITY".

Examples

Run this code

# \donttest{
# Example usage: meaco_data <- tidy_Meaco("path/to/your/meaco_data.csv")
# }

# mydata file
filepath <- data_file_path("mydata.xlsx")
mydata <- readxl::read_excel(filepath, sheet = "Meaco")

head(mydata)

mydata |> tidy_Meaco()

mydata |> tidy_Meaco() |> tidy_TRHdata(avg_time = "hour")



Run the code above in your browser using DataLab