Learn R Programming

rvkstat (version 2.6.3)

vkGetGroupStat: Statistics on visiting the community in 'Vkontakte'.

Description

Load data from the 'Vkontakte' communities by the number of views, subscriptions, replies and community visitors by date.

Usage

vkGetGroupStat(date_from = Sys.Date(), 
               date_to = Sys.Date(), 
               group_id = NULL, access_token = NULL)

Arguments

date_from

The starting date of the displayed statistics in the format YYYY-MM-DD.

date_to

The end date of the displayed statistics in the format YYYY-MM-DD.

group_id

Community ID.

access_token

API access token, obtained using the functions vkAuth or vkGetToken

Value

Date frame with community statistics with the following values:

1. day

date for which statistics is given.

2. views

number of views.

3. visitors

number of unique visitors.

4. total_reach

full coverage.

5. subscribers_reach

subscribers reach.

6. subscribed

number of new subscribers.

7. unsubscribed

number of unsubscribed.

Examples

Run this code
# NOT RUN {
## auth
my_tok <- vkAuth(app_id = 1,app_secret = "H2Pk8htyFD8024mZaPHm")

## Getting community statistics
communityData <- vkGetGroupStat(date_from = "2016-01-01",
                               date_to = "2016-04-01",
                               group_id = 1,
                               access_token = my_tok$access_token)
# }

Run the code above in your browser using DataLab