Learn R Programming

sms (version 2.3.1)

random_panel_selection: random_panel_selection

Description

Select n random rows from a dataframe

Usage

random_panel_selection(indf, n)

Arguments

indf
The initial dataframe from wich a selection will be made.
n
The number of random rows

Value

a selection of rows as a dataframe

Details

Select n random rows from a dataframe

Examples

Run this code
library(sms)
data(survey) #load the data
data(census)
    
some.individuals=random_panel_selection(survey,4)
print(some.individuals)     # Print the selection of individuals

Run the code above in your browser using DataLab