Commit 38514adf authored by jml's avatar jml
Browse files

update vignette

parent d78e5fe4
...@@ -19,11 +19,7 @@ knitr::opts_chunk$set(collapse = T, comment = "#>") ...@@ -19,11 +19,7 @@ knitr::opts_chunk$set(collapse = T, comment = "#>")
#install.packages("nycflights13") #install.packages("nycflights13")
library(nycflights13) library(nycflights13)
data(weather) data(weather)
```
### 'weather' as friendlyts
```R
# There are some duplicated rows, I assume there were a maximum of 2 stations. # There are some duplicated rows, I assume there were a maximum of 2 stations.
varnames <- setdiff(names(weather), c("year", "month", "day", "hour","time_hour")) varnames <- setdiff(names(weather), c("year", "month", "day", "hour","time_hour"))
...@@ -37,16 +33,21 @@ tmp <- tmp %>% ...@@ -37,16 +33,21 @@ tmp <- tmp %>%
tidyr::unite('var_tmp', 'origin','dup','variable') %>% tidyr::unite('var_tmp', 'origin','dup','variable') %>%
tidyr::spread('var_tmp', 'value') tidyr::spread('var_tmp', 'value')
```
### 'weather' as friendlyts
```R
# 'weather' as friendlyts # 'weather' as friendlyts
devtools::install_git("https://git.nilu.no/rfriendlyts/friendlyts.git")
tmp <- friendlyts::friendlyts(df=tmp,date_col="time_hour",date_type="posixlt",tzone="EST") tmp <- friendlyts::friendlyts(df=tmp,date_col="time_hour",date_type="posixlt",tzone="EST")
``` ```
### Basic analysis. ### Basic analysis.
```R ```R
names(tmp) names(tmp)
# Relative humidity # Relative humidity
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment