Description Usage Arguments Details Value Author(s) Examples
ovv
prints an overview of a data frame.
1 | ovv(x, n = 6L, digits = 4L, interspace = 3L)
|
x |
a data frame, matrix or table. |
digits |
integer indicating the number of decimal places (round) or
significant digits (signif) to be used (default value: 4). See
the |
interspace |
integer indicating the number of dots to print between the head and the tail of the object. |
Mostly used for in side effect printing of an overview of the data frame.
Invisibly return the input data frame.
Marc Choisy
Marc Choisy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # overviews of data.frames:
ovv(mtcars)
ovv(iris)
# overviews of matrices:
ovv(as.matrix(mtcars))
ovv(as.matrix(iris))
# overviews of tables:
library(magrittr) # for %>%
library(lubridate) # for ymd, isoweek, isoyear
# a fonction used to create the data set below:
fct <- function(y) {
g <- function(x, y) ymd(as.integer(paste0(y, x)))
start_end <- lapply(c("0101", "1231"), g, y)
seq(start_end[[1]], start_end[[2]], by = "day")
}
# creating a fake data set:
cal <- 10:17 %>%
lapply(fct) %>%
do.call(c, .) %>%
(function(x) lapply(list(isoweek, isoyear), function(f) f(x))) %>%
do.call(cbind, .) %>%
as.data.frame %>%
setNames(c("week", "year")) %>%
unique
# an overview of its table:
ovv(table(cal))
# A SpatialPointsDataFrame
library(sf)
stations <- as(imhen::stations, "Spatial")
stations
class(stations)
ovv(stations)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.