if (FALSE) {
## get friends list for user with the handle "1234"
get_friends(as_screenname("1234"))
## as_screenname coerces all elements to class "screen_name"
sns <- as_screenname(c("kearneymw", "1234", "jack"))
class(sns)
## print will display user class type
sns
## BAD: combine user id and screen name using c()
users <- c(as_userid("2973406683"), as_screenname("1234"))
class(users)
## GOOD: combine user id and screen name using list()
users <- list(as_userid("2973406683"), as_screenname("1234"))
users
## get friend networks for each user
get_friends(users)
}
Run the code above in your browser using DataLab