Learn R Programming

MAINT.Data (version 0.4)

IData: Interval Data objects

Description

IData creates IData objects from data frames of interval bounds or MidPoint/LogRange values of the interval-valued observations.

Usage

IData(Data, 
Seq = c("LbUb_VarbyVar", "MidPLogR_VarbyVar", "AllLb_AllUb",
"AllMidP_AllLogR"), VarNames=NULL, ObsNames=row.names(Data))

Arguments

Data
a data frame of interval bounds or MidPoint/LogRange values.
Seq
the format of Data data frame. Available options are: LbUb_VarbyVar: lower bounds followed by upper bounds, variable by variable. MidPLogR_VarbyVar: MidPoints followed by LogRanges, variable by variable.
VarNames
An optional vector of names to be assigned to the Interval-Valued Variables.
ObsNames
An optional vector of names assigned to the individual observations.

Details

Objects of type IData, describe a data set of NObs observations on NIVar Interval-Valued variables. This function creates an interval-data object from a data-frame with either the lower and upper bounds of the observed intervals or by their midpoints and log-ranges.

Examples

Run this code
# Create an Interval-Data object containing the intervals for 899 observations 
# on the temperatures by quarter in 60 Chinese meteorological stations.

ChinaT <- IData(ChinaTemp[1:8],VarNames=c("T1","T2","T3","T4"))

cat("Summary of the ChinaT IData object:
")  ; print(summary(ChinaT))
cat("ChinaT first ant last observations:
")  
print(head(ChinaT,n=3))
cat("...
")
print(tail(ChinaT,n=3))

Run the code above in your browser using DataLab