Recommend R Users on Github some R packages that they may like.
Methods
Method new()
Instantiate an Agent object
Method recommend_repos_to_user()
Given a user_id suggests n repos the user might like.
Usage
Agent$recommend_repos_to_user(user_id, n, method)
Arguments
user_id
(integer) Github User ID.
n
(integer) How many recommendation should the function return.
method
(character) The recommendation filtering technique to employ:
(1) random returns of repos ids at random
Method recommend_users_to_user()
Given a user_id suggests n users the user might like.
Usage
Agent$recommend_users_to_user(user_id, n, method)
Arguments
user_id
(integer) Github User ID.
n
(integer) How many recommendation should the function return.
method
(character) The recommendation filtering technique to employ:
(1) random returns of users ids at random
Method query_repos_graph()
Given a repo_id find all linked packages in degrees degrees of separation.
Usage
Agent$query_repos_graph(repo_id, degrees = 1, method)
Arguments
repo_id
(integer) Github Repo ID.
degrees
(integer) How many degrees of separation should be included? 1 are only the closest nodes. Inf returns all the graph.
method
(character) The link type to employ. Either
(1) depends returns the package dependencies (as appears in its DESCRIPTION file); or
(2) reverse depends returns packages that are dependent on repo_id.
Returns
(data.frame) A table with two columns from and to. If a repo has dependencies, then from = to. If the repo is dependent on a non-existing package repo, such as 'base', the dependency is discarded.
Method query_users_graph()
Given a user_id find all linked users in degrees degrees of separation.
Usage
Agent$query_users_graph(user_id, degrees = 1, method)
Arguments
user_id
(integer) Github User ID.
degrees
(integer) How many degrees of separation should be included? 1 are only the closest nodes. Inf returns all the graph.
method
(character) The link type to employ. Either
(1) followers What users are following user_id?; or
(2) following What users is user_id following?.
Method query_package_stats()
Given a CRAN package name, and a particular statistic (a function of the data sample), return the value of the requested attribute.
Usage
Agent$query_package_stats(package, statistic)
Arguments
package
(charcter) CRAN package name.
statistic
(character) The information value to calculate
(1) monthly downloads The number of downloads from the RStudio CRAN mirror