Description Usage Arguments Details Value See Also Examples
Compute per-column summaries and return as a data.frame
. Warning: can be an expensive operation.
1 2 3 4 5 6 7 8 |
x |
tbl or item that can be coerced into such. |
... |
force additional arguments to be bound by name. |
countUniqueNum |
logical, if true include unique non-NA counts for numeric cols. |
countUniqueNonNum |
logical, if true include unique non-NA counts for non-numeric cols. |
cols |
if not NULL set of columns to restrict to. |
compute |
logical if TRUE call compute before working |
Can be slow compared to dplyr::summarize_all()
(but serves a different purpose).
Also, for numeric columns includes NaN
in nna
count (as is typical for R
, e.g.,
is.na(NaN)
). And note: replyr_summary()
currently skips "raw" columns.
summary of columns.
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 | d <- data.frame(p= c(TRUE, FALSE, NA),
r= I(list(1,2,3)),
s= NA,
t= as.raw(3:5),
w= 1:3,
x= c(NA,2,3),
y= factor(c(3,5,NA)),
z= c('a',NA,'z'),
stringsAsFactors=FALSE)
# sc <- sparklyr::spark_connect(version='2.2.0',
# master = "local")
# dS <- replyr_copy_to(sc, dplyr::select(d, -r, -t), 'dS',
# temporary=TRUE, overwrite=TRUE)
# replyr_summary(dS)
# sparklyr::spark_disconnect(sc)
if (requireNamespace("RSQLite", quietly = TRUE)) {
my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
RSQLite::initExtension(my_db)
dM <- replyr_copy_to(my_db, dplyr::select(d, -r, -t), 'dM',
temporary=TRUE, overwrite=TRUE)
print(replyr_summary(dM))
DBI::dbDisconnect(my_db)
}
d$q <- list(1,2,3)
replyr_summary(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.