# #' core
#' Given an interaction_model, this will return another interaction_model that corresponds to the "k-core" of the input. This function is recommended when `diagnose(im)`

shows that the majority of rows/columns have 1, 2, or 3 connections. In this case, the data is potentially too sparse for pca. If you simply throwing away the rows/columns that are weakly connected, then you will reduce the connections of those that remain. The k-core is what you get if you keep on iterating. In particular, it will find the largest subset of rows and columns from the interaction_model such that every row and column has at least `core_threshold`

number of connections or "data points" in interaction_tibble. This is exactly the k-core if the row and columns correspond to unique elements (non-overlapping). If the elements in the rows match some elements in the columns, then those elements are represented twice... once for the row and once for the column. It is possible that only one of those is retained.
#'
#' @param im_input
#' @param core_threshold
#'
#' @return
#' @export
#'
#' @import dplyr
#'
#' @examples
core = function(im_input, core_threshold)
subset_im(im_input)
im_input
if(!"coreness" %in% colnames(im_input$row_universe))
print("adding graph summaries (coreness and connected components).")
im = add_bipartite_summaries(im)

Source: `R/clean.R`

`subset_im.Rd`