import_hobo: Process a *.csv file produced by Onset HOBOware...

View source: R/import_hobo.R

import_hoboR Documentation

Process a *.csv file produced by Onset HOBOware (2020-present)

Description

This function imports a comma delimited (*.csv) file produced by Onset HOBOware from Onset data loggers used in NPS Southeast Utah Group parks from 2020 to present. It uses the file name or full path name to produce a list with four components that contain the file information needed to import the csv, metadata about the logger and sampling time, and the raw data.

Usage

import_hobo(
  my_file,
  datestamp_loc = 1,
  plotid_loc = 2,
  plotid_s = 1,
  plotid_e = 3
)

Arguments

my_file

A character string of the file name. This should include the directory path.

datestamp_loc

The index of the location of the timestamp in the file name. Default is '1'.

plotid_loc

The index of the location of the Plot ID in the file name. Default is 2.

plotid_s

The index for the character that starts the Plot ID string. Default is 1.

plotid_e

The index for the character that ends the Plot ID string. Default is 3.

Details

This function imports the data from a csv file into R and retuns a list containing the data used to import the file, the metadata, and the raw data.

Value

This function returns a list with three (3) components.

file_info

This component is a vector that contains the file name, the date stamp, plot ID, the number of lines to skip to properly import the data, the number of columns of data in the raw file, and the Elements measured.

details

This component is a data frame of metadata.

data_raw

This component is a data frame.

See Also

import_hobo_2008

Examples

## Not run: 
library("raindancer")

# Generate list of files
file_list <- list.files(path = system.file("extdata", package = "raindancer"),
                        pattern = ".csv", full.names = TRUE, recursive = FALSE)

# Import data
import_hobo(file_list[6])

## End(Not run)


scoyoc/rainDanceR documentation built on Jan. 10, 2023, 3:29 p.m.