Cubic.Spline.Interpolation: Cubic Spline Interpolation

View source: R/data_functions.R

Cubic.Spline.InterpolationR Documentation

Cubic Spline Interpolation

Description

This function interpolates the selected columns of a data frame with cubic spline interpolation.

Usage

Cubic.Spline.Interpolation(Data, Column.Names)

Arguments

Data

data.frame. Data as in data.frame class.

Column.Names

character. Name of the columns to be interpolated.

Details

The aim of this function is to interpolate the values between two entries. The argument maxgap in na.spline function is internally selected in this function to interpolate all missing values. na.rm argument in na.spline function is selected as FALSE since other NA values should be kept, if there is any.

Value

An data.frame called "data.interpolate".

Author(s)

Omer Kara

Examples

## Not run: 
Cubic.Spline.Interpolation(data, "Open")
data.interpolate

Cubic.Spline.Interpolation(data, c("Open", "High", "Low", "Close"))
data.interpolate

## End(Not run)


omerkara/okara documentation built on Nov. 21, 2023, 7:56 p.m.