Introduction to dad

knitr::opts_chunk$set(echo = TRUE)

Data under consideration

The dad package provides tools for analysing multi-group data. Such data consist of variables observed on individuals, these individuals being organised into groups (or occasions). Hence, there are three types of objects: groups, individuals and variables.

Implemented methods

For the analysis of such data, a probability density function is associated to each group. Some methods dealing with these functions are implemented:

Data organisation

In order to facilitate the work with these multi-group data, the dad package uses objects of class "folder" or "folderh". These objects are lists of data frames having particular formats.

Objects of class folder

Such objects are lists of data frames which have the same column names. Each data frame matches with an occasion (a group of individuals).

An object of class "folder" is created by the functions folder or as.folder (see their help in R).

Example: Ten rosebushes $A$, $B$, $\dots$, $J$ were evaluated by 14 assessors, at three sessions, according to several descriptors including their shape Sha, their foliage thickness Den and their symmetry Sym.

x <- roses[, c("Sha", "Den", "Sym", "rose")]

Coerce these data into an object of class "folder":

rosesf <- as.folder(x, groups = "rose")
print(rosesf, max = 9)

Objects of class folderh

Objects of class "folderh" can be used to avoid redundancies in the data.

In the most useful case, such objects are hierarchical lists of two data frames df1 and df2 related by means of a key which describes the ā€œ1 to Nā€ relationship between the data frames.

They are created by the function folderh (see its help in R for the case of three data frames or more).

Example: Data about 5 rosebushes (roseflowers$variety). For each rosebush, measures on several flowers (roseflowers$flower).

df1 <- roseflowers$variety
df2 <- roseflowers$flower

Build an object of class "folderh":

fh1 <- folderh(df1, "rose", df2)

Try the dad package in your browser

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

dad documentation built on Aug. 9, 2021, 1:06 a.m.