Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

historyFor error - "Column name symbol must not be duplicated." #6

Open
dkincaid opened this issue Dec 17, 2020 · 0 comments
Open

historyFor error - "Column name symbol must not be duplicated." #6

dkincaid opened this issue Dec 17, 2020 · 0 comments

Comments

@dkincaid
Copy link

Describe the bug
Running the example in the README: historyFor("AAPL") returns an error (actually any symbol I use is returning the same error.

Error: Column name `symbol` must not be duplicated.

To Reproduce
Steps to reproduce the behavior:

library(iexcloudR)
historyFor("AAPL")

Expected behavior
a tibble is returned with the history for AAPL stock

Error details

> rlang::last_error()
█
├─<error/tibble_error_column_names_must_be_unique>
│ Column name `symbol` must not be duplicated.
└─<error/vctrs_error_names_must_be_unique>
  Names must be unique.
Backtrace:
  1. iexcloudR::historyFor("AAPL")
  2. tibble::as_tibble(do.call(rbind, data))
  9. tibble::add_column(., symbol = symbol, .before = 1)
 10. tibble:::set_repaired_names(out, .name_repair)
 12. tibble:::repaired_names(...)
 15. vctrs::vec_as_names(...)
 17. vctrs:::validate_unique(names = names, arg = arg)
 18. vctrs:::stop_names_must_be_unique(names, arg)
 19. vctrs:::stop_names(...)
 20. vctrs:::stop_vctrs(class = c(class, "vctrs_error_names"), ...)
> rlang::last_trace()
█
├─<error/tibble_error_column_names_must_be_unique>
│ Column name `symbol` must not be duplicated.
└─<error/vctrs_error_names_must_be_unique>
  Names must be unique.
Backtrace:
     █
  1. └─iexcloudR::historyFor("AAPL")
  2.   └─`%>%`(...)
  3.     ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4.     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  5.       └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  6.         └─iexcloudR:::`_fseq`(`_lhs`)
  7.           └─magrittr::freduce(value, `_function_list`)
  8.             └─function_list[[i]](value)
  9.               └─tibble::add_column(., symbol = symbol, .before = 1)
 10.                 └─tibble:::set_repaired_names(out, .name_repair)
 11.                   ├─rlang::set_names(...)
 12.                   └─tibble:::repaired_names(...)
 13.                     ├─tibble:::subclass_name_repair_errors(...)
 14.                     │ └─base::withCallingHandlers(...)
 15.                     └─vctrs::vec_as_names(...)
 16.                       └─(function () ...
 17.                         └─vctrs:::validate_unique(names = names, arg = arg)
 18.                           └─vctrs:::stop_names_must_be_unique(names, arg)
 19.                             └─vctrs:::stop_names(...)
 20.                               └─vctrs:::stop_vctrs(class = c(class, "vctrs_error_names"), ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant