Closed bpbond closed 4 years ago
This is all inside a larger loop going through the datasets themselves.
In the above code I'm assuming that temperature_columns
is a character vector holding the names of CSR_Txxx columns.
There is CSR_TAIR
and/or CSR_TCHAMBER
. Be careful with these - you will want to set depth to ...? Let's say -1 for now.
Here's a better grep: tcols <- grep("^CSR_T(AIR|[0-9]+)", names(dsd))
Next steps after 2020-07-23 phone call with @jinshijian and @10aDing :
group_by
syntax is really handy. You can use the lubridate package to do the week calculation. So for example
df %>%
mutate(woy = week(CSR_TIMESTAMP_BEGIN)) %>%
group_by(week) %>%
summarize(...)
ports
)calc_q10
.So the output data frame from the above processing should look something like this
@jinshijian noted good idea of start with just one dataset, work all the way through developing pipeline, and after robust you can expand to all
Notes from call with @10aDing 2020-07-29:
sunriseset
or whatever only takes single values, you can use vapply
to apply to a whole columnLet's stick with just calculating for Rh for now.