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
get_timeline -> changing the output a bit? #4
Comments
You wouldn't have any handy resources on this would you? I remember reading about ref classes and attributes in Hadley's book, but if you have any other recommendations I'll take them.
This should now be fixed. |
Sorry about the lack of details. I too learnt about attributes very recently. You'd just need to write |
ropensci/software-review#45 this is where I was told about attributes. |
@masalmon should be integrated now for search_tweets, get_timeline, and stream_tweets (next step will be to integrate with lookup_users). I also added users_data() and tweets_data() functions as shortcuts for attri(x, "users/tweets"). It's about the same amount of code, but it's easier for me at least to remember those over the attr call. |
If you try them out any time soon, let me know how it goes :) |
Good call. There should only be 1 row there. I thought I fixed this, but it seems I overlooked something. Either way, I need to make sure my tests catch this as well. |
And then you could add continuous integration, see e.g. http://juliasilge.com/blog/Beginners-Guide-to-Travis/ :-) |
Oh perfect! The section on Travis in Hadley's book seemed to assume people had a little more familiarity with it than I, so that gentle intro looks perfect! If it's not completely obvious, programming is a recent development for me. My background, and reason I started learning to code at all, is in statistics, so the help, as always, is very appreciated! |
I'll tag @juliasilge so she can see the praise. 😸 And no it's not "completely obvious", you're doing great! |
Hi, I tried to use the timeline function and got the following error. I also tried not parsing the results but it gave me the same error. Thanks for your help!
|
Are you using the Github or CRAN version of rtweet? Can you supply your sessionInfo() as well? |
I'm having trouble replicating the error, but think I may have fixed it (at least, in the Github version). Let me know if you continue to have problems! |
I tried the method in a different session and project and the error went away. So it's due to something in my R environment. I'lll dig some more but you can close the issue. Thanks for your response. |
I'm currently using
get_timeline
and I've noticed it returns two data.frames now. For a package of mine (monkeylearn) I'd been advised to rather have only one data.frame as output with the other data.frame as attributes to the first one, so maybe in your caseusers
could be an attribute oftweets
so that it might be easier to deal withget_timeline
output? It's just a suggestion of course, I find the function great already!Moreover when retrieving 2000 tweets from realDonaldTrump the
users
data.frame contains 4 times the same line, should you add anunique
-call somewhere?The text was updated successfully, but these errors were encountered: