R/head_dsm.R

head.dsm <- function (x, n=6L, k=n, ...) {
  info <- check.dsm(x)
  k <- min(k, info$ncol) # do this first, so change in n doesn't affect the default
  n <- min(n, info$nrow)
  M <- if (info$S$ok) x$S else x$M
  M[1:n, 1:k]
}

Try the wordspace package in your browser

Any scripts or data that you put into this service are public.

wordspace documentation built on Aug. 23, 2022, 1:06 a.m.