Displaying 20 results from an estimated 10000 matches similar to: "month-day-year to Date"
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
2010 Apr 16
1
R CMD check tells me 'no visible binding for globalvariable'
Henrik wrote:
I think what people are also thinking about is that the policy for
publishing a package on CRAN is that it have to pass R CMD check with
no errors, warnings *or* notes. So, in that sense notes are no
different from warnings.
---------------------------------
Getting rid of these notes would be very hard in the survival package.
The population survival routines (survexp, pyears)
2012 Jun 15
2
How to convert month-day-year to Julian data number?
Hello,
I am trying to convert calendar dates (Month, Day, Year) into Julian Days
Product code Bureau of Meteorology station number Month Day Year Date_mdy Date
4102001 70014 1 1 1939 1/01/1939 1/01/1939
4102001 70014 1 2 1939 1/02/1939 2/01/1939
4102001 70014 1 3 1939 1/03/1939 3/01/1939
4102001 70014 1 4 1939 1/04/1939 4/01/1939
4102001 70014 1 5 1939 1/05/1939 5/01/1939
4102001 70014 1 6
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 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
2020 Sep 25
1
Extra "Note" in CRAN submission
When I run R CMD check on the survival package I invariably get a note:
...
* checking for file ?survival/DESCRIPTION? ... OK
* this is package ?survival? version ?3.2-6?
* checking CRAN incoming feasibility ... NOTE
Maintainer: ?Terry M Therneau <therneau.terry at mayo.edu>?
...
This is sufficient for the auto-check process to return the following failure message:
Dear maintainer,
2024 Jun 26
2
Fixing a CRAN note
I am trying to clear up all the "NOTE"s before a CRAN submission, but am a bit confused
about this one.?? What is it complaining about -- that it doesn't like my name?
...
* checking for file ?deming/DESCRIPTION? ... OK
* this is package ?deming? version ?1.4-1?
* checking CRAN incoming feasibility ... [7s/18s] NOTE
Maintainer: ?Terry Therneau <therneau.terry at mayo.edu>?
2018 Mar 08
4
Fwd: Re: [EXTERNAL] Re: backquotes and term.labels
Ben,
Looking at your notes, it appears that your solution is to write your own terms() function
for lme.? It is easy to verify that the "varnames.fixed" attribute is not returned by the
ususal terms function.
Then I also need to write my own terms function for the survival and coxme pacakges?
Because of the need to treat strata() terms in a special way I manipulate the
formula/terms in
2006 Sep 05
3
terms.inner
Question:
I am trying to impliment a function in R that we use quite regularly in
Splus, and it fails due to a lack of the "terms.inner" function in R.
The substitute is?
Part question and part soapbox:
Why remove terms.inner from R? It's little used, but rather innocuous.
Mostly soapbox:
I figured it was no big deal, as I originally discovered the use of
terms.inner from
2019 Sep 06
2
install_github and survival
I cloned therneau/survival and the installation failed since there is no definition for exported function survfit().
A file seems to be missing - there is survfit0() and survfit0.R but, compared to CRAN, no survfit.R.
Georgi Boshnakov
----------------------------------------------------------------------
Message: 1
Date: Thu, 05 Sep 2019 12:53:11 -0500
From: "Therneau, Terry M.,
2016 Apr 15
0
simple interactions
Dear Terry,
Does fitting group + age:group instead of age*group solves your problem?
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
To call in the statistician after the experiment is done may be no more
2006 May 12
2
reusing routines
I've created some Splus code for a microarray problem that
- needed to be in C, to take advantage of some sparse matrix
properties
- uses a cholesky decompostion as part of the computation
For the cholesky, I used the cholesky2 routine, which is a part of the
survival library. It does just what I want and I'm familiar with it (after
all, I wrote it).
In Splus, this all works
2017 Feb 09
2
R CMD check error
Martin,
I am aware of --vanilla; I use it myself for some testing. In this case R_LIBS_USER was
set externally (part of my login) and does not involve any of the R scripts. That means
it is inherited by any subprocess. For example:
tmt1495% R --vanilla --no-environ
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
2017 Feb 09
2
R CMD check error
Martyn,
No, that didn't work.
One other thing in the mix (which I don't think is the issue) is that I call one of the
C-entry points of expm. So the DESCRIPTION file imports expm, the NAMESPACE file imports
expm, and the init.c file is
#include "R.h"
#include "R_ext/Rdynload.h"
/* Interface to expm package. */
typedef enum {Ward_2, Ward_1, Ward_buggy_octave}
2008 Aug 05
4
literate programming
I'm working on the next iteration of coxme. (Rather slowly during the summer).
This is the most subtle code I've done in S, both mathematically and
technically, and seems a perfect vehicle for the "literate programming" paradym
of Knuth. The Sweave project is pointed at S output however, not source code.
I would appreciate any pointers to an noweb type client that was
2003 Nov 19
5
ISOdate returns incorrect date?
Dear all,
I have found the following (for me) incomprehensible behaviour of
ISOdate (POSIXct):
> ISOdate(1900,6,16)
[1] "1900-06-15 14:00:00 Westeurop?ische Sommerzeit"
> ISOdate(1950,6,16)
[1] "1950-06-16 14:00:00 Westeurop?ische Sommerzeit"
Note that in the first case I get the 15th of June back, not the 16th as
I would have expected!
This happened under R-1.7.1 on
2007 Sep 14
2
Date vs date
I wrote the date package long ago, and it has been useful. In my current task
of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm
removing the explicit dependence on 'date' objects from the expected survival
routines so that they better integrate. Comparison of 'date' to 'Date' has
raised a couple of questions.
Clearly Date is more
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
2007 May 10
3
Getting the last day of the month.
Hi,
Given a date, how do I get the last date of that month? I have
data in the form YYYYMM, that I've read as a date using
> x$Date <-
as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1))
But this gives the first day of the month. To get the last day of the
month, I tried
> as.Date(as.yearmon(x$Date,frac=0))
But I don't get the last day of the month here. (Tried
2016 Apr 15
4
simple interactions
I'd like to get interaction terms in a model to be in another form. Namely, suppose I had
variables age and group, the latter a factor with levels A, B, C, with age * group in the
model. What I would like are the variables "age:group=A", "age:group=B" and
"age:group=C" (and group itself of course). The coefficients of the model will then be
the age effect