photobiologyInOut (version 0.4.27)

read_yoctopuce_csv: Read '.CSV' file(s) downloaded from YoctoPuce modules.

Description

Reads and parses the header of processed data CSV files as output by the virtual- or hardware-hubs and modules from Yoctopuce. Uses the comment attribute to store the metadata.

Usage

read_yoctopuce_csv(
  file,
  geocode = NULL,
  label = NULL,
  data_skip = 0,
  n_max = Inf,
  locale = readr::default_locale()
)

Value

read_yoctopuce_csv() returns a tibble::tibble object, with the number of columns dependent on the CSV file read.

Arguments

file

Path to file as a character string.

geocode

A data frame with columns lon and lat used to set attribute "where.measured".

label

character string, but if NULL the value of file is used, and if NA the "what.measured" attribute is not set.

data_skip

integer Number of records (rows) to skip from the actual data block.

n_max

integer Maximum number of records to read.

locale

The locale controls defaults that vary from place to place. The default locale is US-centric (like R), but you can use locale to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.

Details

Yoctopuce modules are small USB connected and USB powered, but isolated, very high quality miniature data acquisition and interface modules. All modules capable of data acquisition can log measured data autonomously and these data can be locally or remotely downloaded as a CSV file. (It is also possible and very easy to access these modules from R using package 'reticulate' and the Python library provided by Yoctopuce, or to send commands and retrieve data through the built-in HTML server of the modules or dedicated hubs.)

References

https://www.yoctopuce.com/

Examples

Run this code
  
  # We read a CSV file previously downloaded from a YoctoMeteo module.

 file.name <- 
   system.file("extdata", "yoctopuce-data.csv", 
               package = "photobiologyInOut", mustWork = TRUE)
                
 yoctopc.tb <- read_yoctopuce_csv(file = file.name)
 
 yoctopc.tb
 cat(comment(yoctopc.tb))

Run the code above in your browser using DataLab