Learn R Programming

vkR (version 0.2)

vkApply: Apply a method over a vector of objects

Description

Returns a data frame of the same number of rows as length of `objs`, each element of which is the result of applying `method` to the corresponding element of `objs`

Usage

vkApply(objs, method)

Arguments

objs

A vector of objects

method

The function to be applied to each element of `objs`

Examples

Run this code
# NOT RUN {
 users <- vkApply(c("",1234567), function(user) getUsers(user, fields="sex"))
 countries <- vkApply(c(2,5122182,1906578), getCountryByCityId)
# }

Run the code above in your browser using DataLab