kurtawirth / botscan

R tool for scanning Twitter for bot activity on a conversation level.
GNU General Public License v3.0
10 stars 6 forks source link

Replace dataframe "assign" with "return" a list? #23

Closed ryantmoore closed 5 years ago

ryantmoore commented 5 years ago

If the goal of the assign() code around line 109 below is to return the full botchecking and tweet data to the user, then we should do so explicitly. Instead of assigning to the user's global environment, I propose we return a list of length 3:

and then we remove the argument user_level. It's trivial to calculate both.

The code in question:

# Assign resulting dataframe to global environment

assign("df", df_userbots, envir = globalenv())