# \donttest{
library(metan)
partial1 <- lpcor(iris)
# Alternatively using the pipe operator %>%
partial2 <- iris %>% lpcor()
# Using a correlation matrix
partial3 <- cor(iris[1:4]) %>%
lpcor(n = nrow(iris))
# Select all numeric variables and compute the partial correlation
# For each level of Species
partial4 <- lpcor(iris, by = Species)
# }
Run the code above in your browser using DataLab