{"action":"created","issue":{"url":"https://api.github.com/repos/business-science/tidyquant/issues/30","repository_url":"https://api.github.com/repos/business-science/tidyquant","labels_url":"https://api.github.com/repos/business-science/tidyquant/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/business-science/tidyquant/issues/30/comments","events_url":"https://api.github.com/repos/business-science/tidyquant/issues/30/events","html_url":"https://github.com/business-science/tidyquant/issues/30","id":220033973,"number":30,"title":"Why can't you finance guys also think of others?","user":{"login":"codingbutstillalive","id":10086172,"avatar_url":"https://avatars3.githubusercontent.com/u/10086172?v=3","gravatar_id":"","url":"https://api.github.com/users/codingbutstillalive","html_url":"https://github.com/codingbutstillalive","followers_url":"https://api.github.com/users/codingbutstillalive/followers","following_url":"https://api.github.com/users/codingbutstillalive/following{/other_user}","gists_url":"https://api.github.com/users/codingbutstillalive/gists{/gist_id}","starred_url":"https://api.github.com/users/codingbutstillalive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingbutstillalive/subscriptions","organizations_url":"https://api.github.com/users/codingbutstillalive/orgs","repos_url":"https://api.github.com/users/codingbutstillalive/repos","events_url":"https://api.github.com/users/codingbutstillalive/events{/privacy}","received_events_url":"https://api.github.com/users/codingbutstillalive/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-06T21:09:05Z","updated_at":"2017-04-06T21:18:11Z","closed_at":null,"body":"I read about your package on R-bloggers, and liked the idea of harmonizing xts with the tidyverse. But I hate that you always think of time series values to come in OHLC format.\r\n\r\nThere are millions of other data in univariate or multivariate time series format. Why do you require this damn OHLC format!?"},"comment":{"url":"https://api.github.com/repos/business-science/tidyquant/issues/comments/292324846","html_url":"https://github.com/business-science/tidyquant/issues/30#issuecomment-292324846","issue_url":"https://api.github.com/repos/business-science/tidyquant/issues/30","id":292324846,"user":{"login":"DavisVaughan","id":19150088,"avatar_url":"https://avatars0.githubusercontent.com/u/19150088?v=3","gravatar_id":"","url":"https://api.github.com/users/DavisVaughan","html_url":"https://github.com/DavisVaughan","followers_url":"https://api.github.com/users/DavisVaughan/followers","following_url":"https://api.github.com/users/DavisVaughan/following{/other_user}","gists_url":"https://api.github.com/users/DavisVaughan/gists{/gist_id}","starred_url":"https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavisVaughan/subscriptions","organizations_url":"https://api.github.com/users/DavisVaughan/orgs","repos_url":"https://api.github.com/users/DavisVaughan/repos","events_url":"https://api.github.com/users/DavisVaughan/events{/privacy}","received_events_url":"https://api.github.com/users/DavisVaughan/received_events","type":"User","site_admin":false},"created_at":"2017-04-06T21:18:11Z","updated_at":"2017-04-06T21:18:11Z","body":"@codingbutstillalive, as Matt mentioned, we don't! The newest blog post explains it well. Why restrict ourselves to OHLC data when there is so much else out there? Here's an example if you don't want to read the whole thing.\r\n\r\n``` r\r\n# Load tidyquant\r\nsuppressPackageStartupMessages(library(tidyquant))\r\n\r\n# Grab some non-OHLC data\r\noil_prices <- tq_get(\"DCOILWTICO\", get = \"economic.data\")\r\n\r\n# Hey this works great with select!\r\ntq_mutate(oil_prices, select = price, mutate_fun = lag.xts, k = 1) %>%\r\n  head(3)\r\n#> # A tibble: 3 × 3\r\n#>         date price lag.xts\r\n#>       <date> <dbl>   <dbl>\r\n#> 1 2007-01-01    NA      NA\r\n#> 2 2007-01-02 60.77      NA\r\n#> 3 2007-01-03 58.31   60.77\r\n\r\n# This does too! \r\nfilter(oil_prices, !is.na(price)) %>%\r\n  tq_transmute(select = price, mutate_fun = weeklyReturn) %>%\r\n  head(3)\r\n#> # A tibble: 3 × 2\r\n#>         date weekly.returns\r\n#>       <date>          <dbl>\r\n#> 1 2007-01-05    -0.07372059\r\n#> 2 2007-01-12    -0.05915793\r\n#> 3 2007-01-19    -0.01850453\r\n```"}}
{"actor":{"display_login":"DavisVaughan"}}