Displaying 20 results from an estimated 8000 matches similar to: "RFC: System and time support functions in R"
2005 Feb 18
1
creating POSIXct dates in C
I'm trying to generate POSIXct times in a call to a C function.
However, I'm having trouble generating times with the proper offset from
UTC.
Can anyone offer any help with this issue?
I've looked at R-2.0.1/src/main/datetime.c, but I was not able to find
an example that I could easily pull from that file.
Thanks in advance,
Whit
Here is my example in C:
#include <stdio.h>
2009 Jan 13
2
particulars of importing/loading libraries
Dear List:
Sorry for posting maybe a trivial question, but I have a basic
understanding problem. If I have say pack1 and pack2, two R packages,
and pack2 depends on and imports pack1 fully (as in the code below), is
there a way to make all the functionality of pack1 available for the
global and other environments (not only for the functions called from
withing pack2) by loading pack2 only? I
2004 May 03
3
R 1.9.0 on AIX, 64-bit
I'm trying to get R 1.9.0 running on AIX 5.1 with the standard AIX
compilers (xlc, xlf) and it is failing 2 of the tests,
test-Reg in reg-tests-1.R like this:
bash-2.05b$ tail -30 reg-tests-1.Rout.fail
[,1] [,2]
[1,] 1 3
[2,] 2 4
[3,] 1 3
[4,] 2 4
> stopifnot(typeof(res) == "list")
> ## were not implemented in 1.8.1
>
>
> ## Date objects with
2010 Sep 01
0
problems with JGR and standard R GUI closing during calculations
Hi R help,
I am having problems running calculations in both the standard R GUI (ver 2.11.0) and the Java GUI for R (1.7-2) in Windows XP Service Pack 3 (2.2 GHz processor with 2 GB of RAM). When I try to import my data and run calculations on it, the GUI closes within a minute, sometimes almost instantaneously after I try to import data to then run the rest of my script. Has anyone had this
1999 Apr 08
0
Keep-timestamp-in-`get'-patch for smbclient in samba-2.0.3
--------
--Multipart_Thu_Apr__8_13:33:51_1999-1
Content-Type: text/plain; charset=US-ASCII
Hello guys,
I always wondered why smbclient keeps timestamp in `put'ting a file
but does not keep it in `get'ting a file. Alternative to keep the
time stamp in `get'ting file is to use -Tc option or smbtar script,
but they are a bit hairy for interactive use, and it can only dump
files with an
2004 Jan 28
5
Julian dates
Hi all,
I have problems with years of dates using "chron" package.
I don't understand why R by this istruction:
> dates("01/02/29",out.format="d/m/year")
[1] 02/Jan/2029
> dates("01/02/30",out.format="d/m/year")
[1] 02/Jan/1930
reads "29" as 2029
and "30" as 1930. How could I change to read "00" to
2009 Jul 01
2
locale changing on Windows
Dear r-helpers,
This is a little bit more of a Windows problem than
an R problem, but ...
any idea how to query the *available* locales from
within R (or otherwise) on a Windows system? Teaching
in a Spanish-language setting and would like to do
something like
Sys.setlocale("LC_TIME","en_US")
(for example so that we can convert dates like
"1970-jan-01" with
2004 Jun 14
4
Quirks with system.time and simulations
I tried the code that Richard O'Keefe posted last week, to wit:
library(chron)
ymd.to.POSIXlt <-
function (y, m, d) as.POSIXlt(chron(julian(y=y, x=m, d=d)))
n <- 100000
y <- sample(1970:2004, n, replace=TRUE)
m <- sample(1:12, n, replace=TRUE)
d <- sample(1:28, n, replace=TRUE)
system.time(ymd.to.POSIXlt(y, m, d))
[1] 8.78 0.10
2012 Jun 08
3
day of the year for chron objects
Hi!
Is not there an standard R function to retrieve the day of the year
(since 1st Jan of the same year)?
I know I can make my own using julian, but find it weird that having
days(), months() etc doy() does not exist as an standard function.
Also, is the following not a bit inconsistent?
> a <- chron("20100506",format="ymd")
> a
[1] 100506
> years(a)
[1] 2010
2013 May 01
3
Chron format question h:m not working
R 2.12.2 on Scientific Linux 6.4
#works
chron(times.="15:00:00", format=c(times="h:m:s"))
#doesn't work
chron(times.="15:00", format=c(times="h:m"))
From chron Manual:
The times format can be any permutation of "h", "m", and "s" separated
by any one non-special character. The default is "h:m:s".
what am I
2011 May 24
2
Extracting day of month from Date objects
I've always found the chron library to be useful for
tasks like this:
> x <- round(runif(10)*100000, digits=0)
> y <- as.Date(x, origin="1970-01-01")
> library(chron)
> days(y)
[1] 7 25 26 25 10 24 1 31 12 8
31 Levels: 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < 11 < 12 < 13 < ... < 31
Notice that it returns the days as
2010 Jun 29
3
formating chron date times for printing
the date were created with chron with this argument
format=c(dates="Y/m/d", times="H:M:S"))
so I have the dates being displayed as
(10/06/22 12:00:00)
I would like to have them displayed as
"2010-06-22 12:00:00" or "%Y-%m-%d %H:%M:%S"
and then I can convert these for mergeing with another data frame
x <- (structure(c(14464, 14464.0104166667,
2010 Jul 07
4
can't open file
I have a text file log2.log encoded Ansi in Windows.
When I execute:
out <- read.zoo(readLines(con <- file("log2.log",
encoding="UCS-2LE")),FUN = as.chron)
have errors:
Error en file(file, "rt") : no se puede abrir la conexi?n
Adem?s: Mensajes de aviso perdidos
1: In file(file, "rt") :
s?lo fue usado el primer elemento del argumento
2004 Nov 22
7
timeDate
what package should I include to use timeDate? I want to convert a
double (num of millis) into date object.
2002 Oct 28
1
as.POSIX (PR#2222)
Full_Name: Alec Stephenson
Version: 1.6.0
OS: linux
Submission from: (NULL) (148.88.138.5)
Appears to be a sign error in as.POSIX(lt/ct)
> library("chron")
The following is fine, with default origin.
> tmp <- chron(1:2, origin = c(1,1,1970))
> as.POSIXlt(tmp)
[1] "1970-01-02 01:00:00 GMT" "1970-01-03 01:00:00 GMT"
These are not.
> tmp <-
2024 Feb 05
7
Bug#1063270: xen: NMU diff for 64-bit time_t transition
Source: xen
Version: 4.17.3+10-g091466ba55-1
Severity: serious
Tags: patch pending sid trixie
Justification: library ABI skew on upgrade
User: debian-arm at lists.debian.org
Usertags: time-t
NOTICE: these changes must not be uploaded to unstable yet!
Dear maintainer,
As part of the 64-bit time_t transition required to support 32-bit
architectures in 2038 and beyond
2014 Mar 16
1
How to convert time_t to R date object
Hi all,
I am writing a R extensions, and I need pass time_t to R in C, but I don't
know how to do.
Can you give me some help? do not use double directly.
Thanks,
Bill
--
*Travel | Programming*
*http://freecnpro.net* <http://freecnpro.net>
[[alternative HTML version deleted]]
2013 May 03
2
Write date class as number of days from 1970
Dear all,
I have a dataset with one column being of class Date. When I write the
output, I would like that column being written as number of days from
1970-01-01. I could not find anywhere a way to do it.
Thanks,
Marco
--
View this message in context: http://r.789695.n4.nabble.com/Write-date-class-as-number-of-days-from-1970-tp4666155.html
Sent from the R help mailing list archive at
2011 Sep 17
1
[PATCH] hivexml: Do not print null input times
Dealing with "1601-01-01T00:00:00Z" is unnecessarily awkward, especially
since the value only represents a 0 found in the data.
Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu>
---
xml/hivexml.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/xml/hivexml.c b/xml/hivexml.c
index cf11676..5030c24 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@
2014 Jul 09
4
Conversion date a numeric y vuelta a date
Hola a todos:
Debe de ser una tonterĂa, pero no consigo saber porque la siguiente linea
no devuelve la fecha actual:
as.Date(as.numeric(Sys.time()))
He hecho esa prueba porque no consigo pasar un numero convertido a partir
de una fecha y modificado a fecha de nuevo.
Gracias por adelantado.
Un saludo,
Alberto.
[[alternative HTML version deleted]]