convert: Convert in data.frame a 'zoo' or 'ts' object

View source: R/convert.R

convertR Documentation

Convert in data.frame a zoo or ts object

Description

This function converts an object of class ts or zoo in a data.frame with a column named time retrieved from index(x). It is designed for those unfamiliar with time series objects.

Usage

convert(x, year=NULL)

Arguments

x

An object of class ts or zoo

year

A vector of length one with year of observation. If provided, a column with time in POSIX format is also returned

Details

An object of class data.frame is returned with a column doy and optionally time at the end of the table.

Value

A dataframe

Author(s)

Gianluca Filippa <gian.filippa@gmail.com>


phenopix documentation built on Aug. 9, 2023, 5:10 p.m.