contents_df: Create information for multiple data frames

View source: R/contents_df.r

contents_dfR Documentation

Create information for multiple data frames

Description

This function creates a latex table or data frame with the number of records, subjects and variables of one or multiple data frames.

Usage

contents_df(
  dfv,
  subject = NULL,
  ret = "tbl",
  capt = "Information multiple data frames",
  align = "lllp{8cm}",
  ...
)

Arguments

dfv

a character vector with data frame(s) in global environment for which the overview should be created

subject

character string that identifies the subject variable within the data frame

ret

a character vector to define what kind of output should be returned (either "dfrm", "tbl", "file")

capt

character with the caption of the table (not used in case data frame is returned)

align

alignment of the table passed to general_tbl (not used in case data frame is returned)

...

additional arguments passed to general_tbl

Details

This function can be used to create a table with the most important information of a data frame for documentation. The function will list the the number of records, subjects and variables of each data frame within dfv. This function is especially usable to indicate the differences between similar data frames or an overview of all data frames within a working environment

Value

a data frame, code for table or nothing in case a PDF file is created

Author(s)

Richard Hooijmaijers

Examples


Theoph1 <-  subset(Theoph,Subject!=1)
Theoph2 <-  subset(Theoph,Subject!=2)
contents_df(c('Theoph1','Theoph2'),subject='Subject',ret='dfrm')

amp.dm documentation built on March 13, 2026, 5:08 p.m.