similar to: date.mdy in date package

Displaying 20 results from an estimated 4000 matches similar to: "date.mdy in date package"

2000 Jan 03
1
Rounding in date.mdy from library(date)
The date library contains a function date.mdy that converts a number D to the date (month,date,year as a list) at D days after 1 Jan 1960. This a convention that fits in with SASs. The logic would be that the result was the date at D days after 1 Jan 1960 00:00:00 (which is a POINT in time as opposed to a date which is an interval), so that any D with 2<=D<3 was rounded to 3 Jan 1960 and
2001 Jan 03
1
package/ date/ download problem
Colleagues I want to download the package "date" from CRAN <http://cran.r- project.org/> to get the R-scripts (for version 1.2.0) *** date/INDEX *** as.date Coerce Data to Dates date.ddmmmyy Format a Julian date date.mdy Convert from Julian Dates to Month, Day, and Year date.mmddyy Format a Julian date date.mmddyyyy Format a Julian date date.object Date Objects mdy.date
2009 Nov 11
1
Unexpected behaviour for as.date()
Hi everyone, I am trying to use the function as.date() from the "dates" package in R 2.10.0 to convert a character date to a Julian date, as follows: > as.date("02-MAY-01", order="mdy") # convert May 2, 2001 to a Julian date [1] 2May1 However, when trying to convert a character date from the year 2000 to a Julian date, I get an <NA> instead of the desired
2009 Aug 11
1
Passing a list object to lapply
Hello, I'm having difficulty passing an object name to a lapply function. Can somebody tell me the trick to make this work? #Works T13702 <- TRACKDATA[["13702.xls"]][["data"]] min(unlist(lapply(list(T13702), function(x) mdy.date(x[1, 2], x[1, 1], x[1, 3])))) 16553 #Works d<-2 assign(paste("T",substr(names(TRACKDATA)[d],1,(nchar(names(TRACKDATA)[d]
2005 Aug 19
2
Handling dates
I have a problem with some functions handling dates, in packages 'date' and 'survival' (they seem to be identical). For instance, from the documentation, -------------------- mdy.date {survival} R Documentation Convert to Julian Dates Description Given a month, day, and year, returns the number of days since January 1, 1960. Usage mdy.date(month, day, year, nineteen = TRUE,
2002 Feb 07
1
Plotting on log scale using plot.date()
Hi, I'm trying to use the date library and I think I'm getting an incorrect warning when I make a plot with plot.date(). For example: > library(date) > x <- as.date(1:100) > y <- 1:100 > plot(x, y, log = "y") Warning message: parameter "log" couldn't be set in high-level plot() function The problem appears to be in the last line of plot.date()
2011 Sep 08
1
Seasonal and 11-day subset for zoo object
I have a zooreg object and I want to be able to generate a value for seasons and 11-day composites paste it onto my zoo data frame, along with year, month and days. Right now I have the following to work from: eg. dat.zoo.mdy <- with(month.day.year(time(dat.zoo)), cbind(dat.zoo, year, month, day, quarter = (month - 1) %/% 3 + 1, dow = as.numeric(format(time(dat.zoo), "%w")))) For
2004 Sep 16
2
date library and notched boxplots
I'm having problems using the date library with notched boxplots. I have separate month, day, and year columns and would like to plot the columns as a date against other variables. I have used the mdy.date(month,day,year) command before with plot(), but it doesn't seem to work with boxplot(). Instead of the dates along the x-axis, I get a list of numbers. Maybe I have the code wrong?
2005 Apr 27
2
date format
Hi, I'm trying to convert a vector containing dates in character format ("dd/mm/yy"): mdy.date (from date package) seems to be able to do that, but it returns to me a vector containing julian dates... but negative! for example: 16/12/03 is converted into -20470 it is because R recognizes year ../03 as 1903, instead of 2003, but how can I do to solve this problem? (of course, I
2000 Apr 26
1
xaxp with dates
Dear friends. As promised ver 1.01 solved the former problem and now dates plot OK in windows. But. In the following code, "cex.axis"=0.5 works OK but "xaxp"=c(14620,14680,4) has seemingly no effect. The limits for xaxp was found from the default plot and inspecting par(). I need to put the date marks at specific points. Could I suppress them altogether and make a new xaxis
2024 Jun 09
2
Format
HI all, My I am trying to convert character date (mm/dd/yy) to YYYY-mm-dd date format in one of the columns of my data file. The first few lines of the data file looks like as follow head(Atest,10);dim(Atest) ddate 1 19/08/21 2 30/04/18 3 28/08/21 4 11/10/21 5 07/09/21 6 15/08/21 7 03/09/21 8 23/07/18 9 17/08/20 10 23/09/20 [1] 1270076 1 I am using the following
2005 Mar 18
1
RE: problem with Dates
It seems that you have load the "survival" package date.mdy is a function from this one. In this function the "origin" of the time is the first day of 1970 in the base package the origin is the first day of 1960 it's very curious... Benjamin Esterni France From: "Vegard Andersen" <vegard.andersen@ism.uit.no> Subject: [R] Date conversion problem using
2010 Nov 24
3
Custom ticks on x axis when dates are involved
Hi, I have a set of irregular time series and i want to produce a simple plot, with dates on x axis and attribute value of y axis. This is simple enough but my x axis is divided automatically by ticks every 5 years. I would like to have a tick every year at January 1st. I am not sure how i can do that - i end up with something very close to what i want, but it is clunky and not very correct. I
2008 Dec 28
1
month-day-year to Date
I have a data from with 3 numeric variables, and wish to create a Date object. The old "date" library had a function mdy.date to do this. I've chased all of the See Also sections I can find for the Date class, and didn't find anything comparable. Yes, I can use as.Date(paste(data$year+1900, data$month, data$day), sep='/')) but it seems odd pack something together that
2004 Oct 11
5
read "4-jan-02" as date
Dear R users, I have a column with dates (character) in a data frame: 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 and I need to convert them to (Julian) dates so that I can sort the whole data frame by date. I thought it would be very simple, but after checking the documentation and the list I still don't have something that works. 1. as.Date returns the error below. What am I
2003 Sep 17
2
Date on x-axis of xyplot
xyplot doesn't seem to want to label my x-axis with dates but instead puts the day-number for each date. begdate is the number of days since January 1, 1960 and was initially created by library(date) ... polls$begdate<-mdy.date(begmm,begdd,begyy) I create a new dataframe (pollstack) which includes begdate. In the process begdate seems to lose its date attribute so I redo it as: >
2009 Apr 30
2
problem in as.date
I never understood that why is the value returned by as.date function in the library(survival) never matches with the description given in the help file: Following is the extract from ?as.date Description: Converts any of the following character forms to a Julian date: 8/31/56, 8-31-1956, 31 8 56, 083156, 31Aug56, or August 31 1956. Usage: as.date(x, order = "mdy", ...)
2009 Nov 11
1
Unexpected behavior for as.date()
The date library was written 20 or so years ago. It was a very good first effort, but the newer Date library has superior functionality in nearly every way. The date library is still available, for legacy projects such as yours, but I do not advise it for new work. To answer your specific questions: 1. What you have is a real bug. The underlying C routine that scans through the text returns
2005 Jul 28
1
conversion from SAS
Hi, I wonder if anybody could help me in converting this easy SAS program into R. (I'm still trying to do that!) PROC IMPORT OUT= WORK.CHLA_italian DATAFILE= "C:\Documents and Settings\carleal\My Documents\REBECCA\stat\sas\All&nutrients.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; data chla_italian; set chla_italian;
2005 Oct 13
1
expand.grid problem
Hi all, I want to make all possible combination from dataset below: V1 <- c(0,1,2) V2 <- c(0,1) V3 <- c(0,1) V4 <- c(0,1) V5 <- c(0,1) V6 <- c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) V7 <- c(0,1,2,3,4,5,6) V8 <- c(0,1) V9 <- c(0,1) V10 <- c(0,1) V11 <- c(0,1) V12 <- c(0,1) V13 <- c(0,1) V14