README.md

gnnlab

水圏植物生態学研究室用の便利な関数をまとめています。 研究室でよく使う, オンセット社のデータロガー読み込み関数, アレック電子のCompact CEMとCKUの読み込み関数, Dataflow Systems の Odyssey 光量子量ロガーの読み込み関数を準備しています。 This package contains a number of useful functions to read data files from the following data loggers:

Onset Inc.

Dataflow Systems

Alec Electronics

Other functions

Installation

devtools::install_github("gnishihara/gnnlab")

Important

Check the locale of the system (the server runs on Debian). If the locale is in en_US and the data files are in ja_JP.UTF-8, then there will be errors in the date stamp when reading the file!

if(grepl("en_US", Sys.getlocale("LC_TIME"))) { 
  # LC_TIME の設定が en_US.UTF-8 なら、ja_JP.UTF-8 にかえる。
  # 買えない場合、parse_date_time()の午前・午後変換がバグる。
  Sys.setlocale("LC_TIME", "ja_JP.UTF-8")
}

Example

library(tidyverse)
library(gnnlab)

fnames = dir("~/Lab_Data/kawatea/", full.names=TRUE, recursive=TRUE)
df = tibble(fnames)

# Dissolved oxygen datalogger example

str_subset(fnames, "DO") %>% read_onset()

Memo

devtools::document() # To use roxygen2 to create the man files.
devtools::build() # To build the package.
devtools::install() # To install locally.


gnishihara/gnnlab documentation built on April 13, 2025, 5:48 p.m.