Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

network_graph: arguments imply differing number of rows error #743

Closed
mancebral opened this issue Oct 26, 2022 · 2 comments
Closed

network_graph: arguments imply differing number of rows error #743

mancebral opened this issue Oct 26, 2022 · 2 comments

Comments

@mancebral
Copy link

Problem

When I use network_graph() over a rtweet object, the one obtained with the function search_tweets(), I get the error:

Error in data.frame(from = um$id_str, to = ur$id_str, type = "retweet") :
arguments imply differing number of rows: 3982, 3988, 1

Expected behavior

It doesn't happen always, it depends of the number of tweets searched, and the query. I suppose that it is motivated by some column that is not parsing well the lists, but I don't know how to fix it, and I understand that is a problem of the function itself.

Reproduce the problem

## insert code here
wHashtags <- search_tweets("#whatsapp", 10000)

wNetworkGraph <- network_graph (wHashtags, 
                                 e = c("mention", "retweet", "reply", "quote"))

rtweet version

[1] ‘1.0.2’

Session info

R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

@llrs
Copy link
Collaborator

llrs commented Oct 26, 2022

Thank you very much for your detailed report!

This issue might be related to #730, where accounts deleted caused problems with network_data. I fixed this in the devel version of the package (available at the devel branch) in case you want to test if it fixes the problems.

However, as you noted this might be hard to reproduce and without it I cannot fix the issue. If you find the error again, please store the tweets causing the error and upload them here (or send them to me via email) so that I can explore the problem and fix it.

@llrs
Copy link
Collaborator

llrs commented Dec 21, 2022

Closing as I think this was fixed, but if not please reopen again or open a new issue.

@llrs llrs closed this as completed Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants