df.check | R Documentation |
This function is a wrapper around the functions dim
for the number of
rows and columns, names
for the variable names, df.head
for the
first rows, and df.tail
for the last rows of a data frame.
df.check(data, print = c("dim", "names", "head", "tail"), n = 4,
digits = 3, width = 20, row.names = TRUE, row.names.col = "gray2",
message = TRUE, message.col = "b.blue", check = TRUE, output = TRUE)
data |
a data frame. |
print |
a character string or character vector indicating which
results to show on the console, i.e., |
n |
a numeric value indicating the number of rows to be printed on the console. |
digits |
a numeric value indicating the maximum number of decimal places to be used. |
width |
a numeric value indicating the maximum width of the character strings in the vector. |
row.names |
logical: if |
row.names.col |
a character string indicating the text color for the row
names, see |
message |
logical: if |
message.col |
a character string indicating the text color for the
number of remaining rows and columns printed on the
console, see |
check |
logical: if |
output |
logical: if |
Note that this function only provides a basic data check suitable for checking a data frame after importing data into R and is not designed to offer a thorough data check (e.g., identifying duplicate IDs or inconsistencies in the data).
Takuya Yanagida
df.head
, df.head
,
# Example 1: Check data frame mtcars
df.check(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.