-
-
Notifications
You must be signed in to change notification settings - Fork 79
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 as(segments, "segment_ga4") : no method or default for coercing “list” to “segment_ga4” #253
Labels
Comments
If I can get a reproducible example, I'll put a test in then try out different solutions. |
Here's an example that produces the error noted above. Both
|
Thanks for the test! I think this is solved now in the latest version on GitHub, will be on CRAN |
etk4ya
added a commit
to etk4ya/googleAnalyticsR
that referenced
this issue
Sep 6, 2019
I've encountered a similar problem to Issue 8-bit-sheep#253, but with an error in Line 356: as(dim_filters, ".filter_clauses_ga4"). It seems there's no method or default for coercing "list" to ".filter_clauses_ga4". So I'm hoping that the solution you applied for segments will work for dim_filters. Thanks!
This was referenced Nov 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What goes wrong
Previously users were able to create multiple segments using segment_ga4 then combine them using list(). But now this generates an error "Error in as(segments, "segment_ga4") : no method or default for coercing “list” to “segment_ga4”"
Running
class(segments) <- "segment_ga4"
immediately after creating thesegments
list is a workaround.Ideas for resolution:
Should a list of 'segment_ga4' objects have its own class name separate from an atomic
segment_ga4
object? If so, is there a function in googleAnalyticsR to create such a list object rather than the user having to create one by usingy <- list(x)
andclass(y)<-'segment_ga4'
? Or should we modify googleAnalyticsR to examine the elements of a supplied list to determine whether all of the elements are of the class 'segment_ga4'?The text was updated successfully, but these errors were encountered: