Learn R Programming

Biograph (version 2.0.6)

year_as_Date: Converts a vector of dates in decimal years (calendar years and fractions of year) to object of class 'Date'.

Description

Converts vector of calendar years and fractions of year to object of class 'Date'.

Usage

year_as_Date (x,format.out)

Arguments

x
Calendar year and fraction of year, e.g. 2012.448
format.out
Format of date

Value

Examples

Run this code
	# d=1946.167, which is March 1,1946 
	year_as_Date (x=1946.167,format.out='%d-%m-%Y')
     

Run the code above in your browser using DataLab