MyNixOS website logo
Description

S3 Classes and Methods for Tidy Functional Data.

Defines S3 vector data types for vectors of functional data (grid-based, spline-based or functional principal components-based) with all arithmetic and summary methods, derivation, integration and smoothing, plotting, data import and export, and data wrangling, such as re-evaluating, subsetting, sub-assigning, zooming into sub-domains, or extracting functional features like minima/maxima and their locations. The implementation allows including such vectors in data frames for joint analysis of functional and scalar variables.

tf tf website

Lifecycle:experimental codecov.io R-CMD-check

The tf package provides necessary infrastructure for tidyfun with minimal dependencies – specifically: no tidyverse-dependencies.

The goal of tidyfun, in turn, is to provide accessible and well-documented software that makes functional data analysis in R easy – specifically data wrangling and exploratory analysis.

tf includes definitions of new S3 data types for vectors of functional data and associated methods. These tf-vectors, with subclasses tfd and tfb, use the vctrs-framework, can be operated on using most standard functions (+, mean(), c(), etc.) as well as several new functions in tf that implement operations specific for functional data (tf_smooth, tf_derive, tf_integrate).

Crucially, vectors of class tf can be included in data frames containing other variables, for simple and reliable data manipulation. This approach is connected to the conceptual framework in functional data analysis which assumes that complete functions are the unit of observation. With tidyfun and tf, you can keep full curves alongside numeric, factor, and other observations on the same subject in one data frame.

Installation

You can install the latest release from GitHub with:

pak::pak("tidyfun/tf")

Overview

tf provides:

  • new data types for representing functional data: tfd & tfb
  • arithmetic operators and descriptive statistics for such data
  • basic graphics functions for tf vectors
  • basic data wrangling for functional data: reshaping from list columns to wide to long and back, interpolating on different grids, filtering and zooming, etc.

Please see the tidyfun website for the full documentation including vignettes etc.

What does it do?

New vector-like data types for functional data

tf provides new S3-classes for functional data, either as raw data (class tfd for tidy functional data) or in basis representation (class tfb for tidy functional basis data).

Such tf-objects can be subsetted or subassigned, computed on and summarized.

Almost all

  • operators like ==, + or *
  • math functions like sum, log or abs
  • and statistics functions like mean or sd

are defined for the vector classes defined in tf (more).

The tf objects are just glorified lists, so they work well as columns in data frames. That makes it a lot easier to keep your other data and functional measurements together in one object for preprocessing, exploratory analysis and description. At the same time, these objects actually behave like vectors of functions to some extent, i.e., they can be evaluated on any point in their domain, they can be integrated or differentiated, etc.

See here for more information on the operations defined for tf vectors.

Methods for converting existing data to tf and back

tf includes functions tfd and tfb for converting matrices, data frames, etc. to tf vectors and back. More data wrangling methods in a tidyverse-inspired way and ggplot2-geoms for functional data are available in tidyfun.

See here for details on getting data into (and out of) the tf format.


Found a bug? Got a question? Missing some functionality?
Please let us know so we can make it better.

Metadata

Version

0.3.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows