PMassicotte / gtrendsR

R functions to perform and display Google Trends queries
352 stars 112 forks source link

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

Open malteh123 opened 2 months ago

malteh123 commented 2 months ago

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 commented 2 months ago

Please make a reproducible example.