respR
integrates nicely with the tidyverse, specifically with
dplyr
functions e.g. select()
,
filter()
and mutate()
, and
magrittr
pipe operators (“%>%
”) to clearly
express workflows in an organised sequence.
It also works with the new native pipe operator (|>
)
introduced in R
v4.1, however the dpylr
pipes have some additional
functionality. For more information, see the Pipes
chapter in the online R for Data Science book.
Here we show how using %>%
pipes can make data
analysis worklows simpler for the user.
Typical analysis using regular R
syntax:
# 1. check data for errors, select cols 1 and 15:
urch <- inspect(urchins.rd, 1, 15)
# 2. automatically determine linear segment:
rate <- auto_rate(urch)
# 3. convert units
out <- convert_rate(rate, "mg/l", "s", "mg/h/kg", 0.6, 0.4)
Alternatively, use tidyverse
pipes: