lower_triangular-methods: Keep rows corresponding of a lower triangular matrix built...

Description Usage Arguments Details Value Examples

Description

lower_triangular() takes as imput a 'tbl' formatted as | <element> | <feature> | <value> | <...> | and returns a filtered 'tbl'

Usage

1
2
3
4
5
6
7
lower_triangular(.data, .col1, .col2, .value)

## S4 method for signature 'spec_tbl_df'
lower_triangular(.data, .col1, .col2, .value)

## S4 method for signature 'tbl_df'
lower_triangular(.data, .col1, .col2, .value)

Arguments

.data

A 'tbl'

.col1

A column name

.col2

A column name

.value

A column names of the value column

Details

\lifecycle

maturing

...

Value

A 'tbl' with filtered rows

A 'tbl' with filled abundance

A 'tbl' with filled abundance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(dplyr)
library(purrr)
library(tidyr)

mtcars_tidy_permuted = 
  mtcars_tidy %>% 
  filter(feature == "mpg") %>% 
  head(5) %>% 
  permute_nest(car_model, c(feature,value))

mtcars_tidy_permuted %>%
 # Summarise mpg
 mutate(data = map(data, ~ .x %>% summarise(mean(value)))) %>%
unnest(data) %>%

# Lower triangular
lower_triangular(car_model_1, car_model_2,  `mean(value)`)

nanny documentation built on July 1, 2020, 10:20 p.m.