flatten_dataframe_prime: Flatten Dataframe Prime

Description Usage Arguments Value Examples

View source: R/flatten_dataframe_prime.R

Description

Flattens a list so that all prime numbers in embedded lists are returned in a flat list

Usage

1

Arguments

df

A dataframe of numbers; largest number cannot be greater than 1000

Value

A numeric vector that has all of the prime numbers in df

Examples

1
2
3
a <- data.frame(c(2, 3, 4), c(5, 6, 7), c(8, 9, 10))
flatten_dataframe_prime(a) 
# returns the numeric vector c(2, 3, 5, 7)

UBC-MDS/mlist_R documentation built on May 7, 2019, 7:14 p.m.