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

Error in start_top:end_top : NA/NaN argument after checking that there are no NAs and no NaNs #460

Open
malteh123 opened this issue Apr 17, 2024 · 3 comments

Comments

@malteh123
Copy link

for (i in 1:5) {
trends <- gtrends(keyword = name_gruppen_cleaned[[i]],
time = zeit_gruppen[[i]],
geo = "US",
gprop = "web",
hl = "en-US",
category = 0,
compared_breakdown = FALSE,
low_search_volume = FALSE,
cookie_url = "http://trends.google.com/Cookies/NID",
tz = 0,
onlyInterest = FALSE)

print(trends)
}

When I run this code R returns this "Error in start_top:end_top : NA/NaN argument". I have checked with anyNA(unlist(name_gruppen_cleaned)) and any(is.nan(unlist(name_gruppen_cleaned))) if there are any NAs or NaNs in name_gruppen_cleaned, but there are not.

Does anyone know what I can do?

@PMassicotte
Copy link
Owner

Please make a reproducible example.

@vidarsumo
Copy link

I'm getting the same, here is an example from the help file.

gtrends(keyword = "obama", geo = "US-AL-630")
Error in start_top:end_top : NA/NaN argument

@PMassicotte
Copy link
Owner

Install the dev version and try again. It works on my side.

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

3 participants