Learn R Programming

radiant (version 0.1.95)

getdata: Get data for analysis functions

Description

Get data for analysis functions

Usage

getdata(dataset, vars = "", na.rm = TRUE, filt = "", slice = "")

Arguments

dataset
Name of the dataframe
vars
Variables to extract from the dataframe
na.rm
Remove rows with missing values (default is TRUE)
filt
Filter to apply to the specified dataset. For example "price > 10000" if dataset is "diamonds" (default is "")
slice
Select a slice of the specified dataset. For example "1:10" for the first 10 rows or "n()-10:n()" for the last 10 rows (default is ""). Not in Radiant GUI

Value

Data.frame with specified columns and rows

Examples

Run this code
r_data <- list()
r_data$dat <- mtcars
getdata("dat","mpg:vs", filt = "mpg > 20", slice = "1:5")

Run the code above in your browser using DataLab