Displaying 20 results from an estimated 4000 matches similar to: "Chron, as.POSIXct problem"
2003 Nov 11
3
Calendar Time Series
Hello,
Does R have any facilities for calendar time series? I'm working
with a 40 year long, daily time series and I would like to have each
datum associated with a calendar date. I searched the R website and
found several new packages for irregular time series but none for cts.
By the way, I just installed 1.8.0 on Mac OSX and the installation
was effortless! I also very much like
2004 Mar 05
3
as.POSIXct problem
Hi all,
I'm having difficulty converting a 'dates' object to a POSIXct object:
testDATES<-c(35947,35971,36004,36008,36053,36066)
testDATES<-chron(dates=testDATES, format = c(dates = "m/d/y"),
origin=c(month = 12, day = 30, year = 1899))
>[1] 06/01/98 06/25/98 07/28/98 08/01/98 09/15/98 09/28/98
> as.POSIXct(testDATES)
[1] NA NA NA NA NA NA
2003 Dec 11
2
Failed installation on Mac OSX 10.3 (PR#5697)
I've installed R 1.8.1 on OSX 10.3 (Panther) using the RAqua.pkg and
all indications were that the installation was successful. However,
after double clicking the R icon in the Applications folder, nothing
appears to happen. The following message appears on the console:
Mac OS X Version 10.3 (Build 7B85)
2003-12-11 08:45:31 -0500
prefs written
dyld:
2003 Dec 11
2
Failed installation on Mac OSX 10.3 (PR#5697)
I've installed R 1.8.1 on OSX 10.3 (Panther) using the RAqua.pkg and
all indications were that the installation was successful. However,
after double clicking the R icon in the Applications folder, nothing
appears to happen. The following message appears on the console:
Mac OS X Version 10.3 (Build 7B85)
2003-12-11 08:45:31 -0500
prefs written
dyld:
2004 May 08
1
Installing R 1.9.0 on OSX
I've downloaded and installed R 1.9.0 under OS X 10.3.3. I then
removed my previous R 1.8.0 installation by following the
instructions in the readme file, e.g.,
1. drag the "StartR" icon into the Trash;
2) go inside your Home directory and search for the Library folder.
Inside the Library folder in your Home directory you'll
find a RAqua directory: drag the RAqua
2005 Jun 10
1
Fortran compilation error
Hello,
I'm trying to install a package that requires a Fortran compiler
(Hmisc) using R CMD INSTALL. I downloaded the package source onto my
Desktop, unzipped it, and then typed:
R CMD INSTALL /Users/brianbeckage/Desktop/Hmisc
* Installing *source* package 'Hmisc' ...
** libs
g77 -fno-common -g -O2 -c cidxcn.f -o cidxcn.o
g77 -fno-common -g -O2 -c cidxcp.f -o cidxcp.o
g77
2012 Jun 15
2
time zones and the chron to POSIXct conversion
Hey R folks,
i found some strange (to me) behaviour with chron to POSIXct conversion.
The two lines of code result in two different results, on ewith the
correct time zone, one without:
library(chron)
as.POSIXct(chron('12/12/2000'), tz = 'UTC')
as.POSIXlt(chron('12/12/2000'), tz = 'UTC')
Only the code below would give me a POSIXct object with the correct time
2004 Aug 09
4
Simultaneous subscripts and superscripts
Dear List,
I'd like to add text to a plot where a text symbol has both a
superscript and subscript. For example, the variable S with a
superscript 2 and a subscript t. I have been able to accomplish this
using either
expression( paste(S,atop(scriptstyle(2),scriptstyle(t))) )
or
expression( {S[t]}^2 )
but the spacing isn't quite right (or rather what I'd like) using
either of
2004 Jul 07
1
question about seq.dates from chron vs. as.POSIXct
Dear R People:
Here is an interesting question:
>library(chron)
>xt <- seq.dates(from="01/01/2004",by="days",length=5)
>xt
[1] 01/01/04 01/02/04 01/03/04 01/04/04 01/05/04
>
#Fine so far
>as.POSIXct(xt)
[1] "2003-12-31 18:00:00 Central Standard Time"
[2] "2004-01-01 18:00:00 Central Standard Time"
[3] "2004-01-02 18:00:00 Central
2004 Mar 06
0
Summary: as.POSIXct
Suggestions from both Prof Brian Ripley and Gabor Grothendiec solved
my problem.
From Prof Ripley:
>This is a problem of your OS: your example works on all of mine.
>
>Can't you change the origin in chron? If not, you should certainly be
>able to do
>
>as.POSIXct(strptime(as.character(testDATES), "%m/%d/%y"))
This still resulted in NA's on my system.
>
2009 Jan 04
1
POSIXct and chron issues with tz
Dear All-
I am trying to merge two data files - they have different date formats
and different times zones. I need to match up the date/time of the
datasets and then invoke a conditional statement, such as: if dataC$mph
is >= 12 then keep dataM$co23 for the corresponding time/date stamp.
snippets of data files:
*dataC.txt*
LST in mph Deg DegF DegF2 % volts Deg
2004 Mar 01
6
Find out the day of week for a chron object?
I know that this is correct:
library(chron)
x = dates("01-03-04", format="d-m-y", out.format="day mon year")
print(x)
It gives me the string "01 Mar 2004" which is correct.
I also know that I can say:
print(day.of.week(3,1,2004))
in which case he says 1, for today is monday.
My question is: How do I combine these two!? :-) I have a
2008 Aug 01
1
chron objects: input/output
Hi list, I have some questions regarding
1) conversion of date + time characters to chron
2) formatting chron object printing
Regarding (1), Gabor's Rnews 2004 4/1 article has been indispensible,
but I often work with files where dates and times are contained in a
single field. In this case, I would like to control input/output of
chron objects when each observation of date and time is
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,
2002 Feb 02
1
chron problem: extracting days and years
Hello r-help,
I'm trying to split a character vector of dates of the form "dd-mmm-yy"
into component days, months and years. But
> library(chron)
> testdate<-as.POSIXlt(strptime("17-Sep-98","%d-%b-%y"))
> testdate
[1] "1998-09-17"
> months(testdate)
[1] "September" # which is fine, but for days and years I get
>
2005 Jul 19
2
Problems with date-format (R 2.1.1 + chron)
Hello,
today I've updated on the newest R-Version. But sadly a function I needed
didnt want to work:
The input is e.g.
days(as.Date("21-07-2005","%d-%m-%y"))
the error is: Fehler in Math.Date(dts): floor nicht definiert f??r Date
Objekte
(Error in Math.Date(dts): floor not defined for date objects)
Same for year. Only months gives me the correct output.
In Version
2010 Oct 19
4
Chron object in time series plot
Dear R users, I have the following script to create bins of specified time
intervals
bin_end=60/bin_size
bin_size=bin_size*100
h=seq(070000,180000,by=10000)
breaks=c()
for (i in h)
{
for (j in 0:(bin_end-1))
{
value=i+(bin_size)*j
breaks=append(breaks,value)
}
}
I would like to plot then using the time as x-axis. I tried the following
prova=zoo(myseries,times(breaks))
but of
2009 Jul 20
1
Problem with as.POSIXct on dates object
Dear R-helpers,
I have a problem converting an object made with the 'chron' function
to a POSIXct object:
# Make date based on DOY
dat <- chron(dates=232, origin.=c(month=1, day=1, year=2008))
dat
#[1] 08/20/08
# Converting to POSIXct uses current timezone (Sydney):
as.POSIXct(dat)
#[1] "2008-08-20 10:00:00 EST"
# Setting GMT timezone has no effect?
as.POSIXct(dat,
2006 Nov 27
2
as.Date: conversion pb from POSIXct (PR#9386)
Full_Name: Xiao Gang FAN
Version: 2.4.0
OS: Windows
Submission from: (NULL) (159.50.101.9)
> library(chron)
> as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d")))
[1] "1994-01-23"
2011 Mar 08
1
Date arithmetic coerces POSIXlt to POSIXct?
Hi. This feels like a bug to me, or at least an undocumented feature,
but I thought I'd see what people here thought of it. Consider a POSIXlt
object like this one:
> a <- as.POSIXlt ("2011-01-23 12:45:45")
> class (a)
[1] "POSIXlt" "POSIXt"
Fine. Now, if I do some arithmetic on that object, the result is
converted to POSIXct.
> class (a