Displaying 20 results from an estimated 500 matches similar to: "X-axis with POSIXct dates"
2001 Sep 21
1
behavior of xaxt = "n" with POSIXct dates
Prof. Ripley has provided very helpful information regarding X-axis
labeling with POSIXct-class dates. Now I've run into another bit of
problematic behavior. I'm running R 1.3.0 on Windows NT 4.0.
When I create a plot with the optional argument xaxt = "n", and the X axis
is generated from dates of class POSIXct, the X axis is plotted.
Obviously, I'd like to prevent the X
2005 Jun 06
1
A performance anomaly
I wrote a simple log likelihood (for the ordinary least squares (OLS)
model), in two ways. The first works out the likelihood. The second
merely calls the first, but after transforming the variance parameter,
so as to allow an unconstrained maximisation. So the second suffers a
slight cost for one exp() and then it pays the cost of calling the first.
I did performance measurement. One would
2006 Nov 21
4
means over factors in mlm terms
I'm trying to write a function to find the means over factors of the
responses in a mlm (something I would do easily in SAS with PROC SUMMARY).
The not-working stub of a function to do what I want is below,
and my problem is that I don't know how to call aggregate (or
some other function) in the context of terms in a linear model
extracted from a lm/mlm object.
means.mlm <-
2004 Feb 04
0
Job opportunity
I'm pleased to announce that my employer, Becton Dickinson, has an open
position for software implementation in the Matlab and S languages. If
interested, send a cover letter and resume (or CV) to Dr. Richard Moore at
richard_moore at bd.com. If you have questions, contact myself (at
jim_garrett at bd.com) or Dr. Moore.
Below find a position description.
Jim Garrett
Becton Dickinson
2008 Jan 08
1
retaining "POSIXct" formatting when using apply(muff, FUN=MAX) on POSIXct dataframe?
How do I retain "POSIXct" formatting when using apply, with FUN=max?
#example:
mydata <- rep(Sys.time(), 10)
mydf <- data.frame(matrix(data=mydata, nrow=2, ncol=length(mydata) ) )
for(i in seq(mydf))class(mydf[[i]]) <- class(mydata)
str(mydf)
maxdates <- apply(mydf,2,max,na.rm=T)
str(maxdates)
#Why is the formattign now "chr", and not
2004 Dec 10
0
strange gee behavior
I'm using R 1.9.1 on suse server v9 enterprise with the gee package version
4.13-10.
I have code that runs in an automated script. It uses the gee function from
the gee package. The script is run quite often without error.
I have a problem where the script locks up R when calling this function (it
starts execution and never finishes). I was able to track down the
offending data and determine
2004 Aug 21
3
Puzzled at lm() and time-series
I tried toy problems and there doesn't seem to be a basic problem
between lm() and ts objects:
X = data.frame(x=c(1,2,7,9), y=c(7,2,3,1))
lm(y ~ x, X)
X <- lapply(X, function(x) ts(x, frequency=12, start=c(1994,7)))
lm(y ~ x, X)
and this works fine - whether you do an lm() before or after making ts
objects, it's okay.
But I have a situation where things aren't okay.
2002 Aug 12
1
set.seed
I'm running into problems with set.seed--maybe I'm misunderstanding
something.
I'm running R 1.5.1 on Windows 2000.
I'm basically trying to capture the random seed so that I can reproduce a
simulation if it's necessary later. Using set.seed, I can certainly get
reproducible results, but not the results I get on the first pass. Here's
an example:
# Generate a random
2016 May 25
1
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
On 2016-05-25 19:13, Kelly Lesperance wrote:
> Hdparm didn?t get far:
>
> [root at r1k1 ~] # hdparm -tT /dev/sda
>
> /dev/sda:
> Timing cached reads: Alarm clock
> [root at r1k1 ~] #
Hi Kelly,
Try running 'iostat -xdmc 1'. Look for a single drive that has
substantially greater await than ~10msec. If all the drives
except one are taking 6-8msec, but one is very
2011 Jul 15
2
Odd behaviour of as.POSIXct
Dear all,
how come the first loop in the below fails, but the second performs as
expected?
days <- as.Date( c("2000-01-01", "2000-01-02") )
for(day in days)
{
as.POSIXct(day)
}
for( n in 1:length(days) )
{
show(as.POSIXct(days[n]))
}
Many thanks, Jo
[[alternative HTML version deleted]]
2011 Jun 01
1
Problem with as.POSIXct()
Hi, when I type in these words:
> a=c("2011-06-01 17:21:24.83", "2011-06-01 17:21:24.283")
> as.POSIXct(a)
the real output is:
[1] "2011-06-01 17:21:24.830 CST" "2011-06-01 17:21:24.283 CST"
rather than the expected one:
[1] "2011-06-01 17:21:24.083 CST" "2011-06-01 17:21:24.283 CST"
How can I deal with such
2011 May 27
0
lubridate, as.POSIXct and a vector of times: bug or feature??
It took me some time to realize this annoying behavior was coming from
lubridate.
Perhaps this behavior is unexpected a result of cursory knowledge of it....
## The expected behavior
> sometimes=c(0,1,2,3)*60*60*24
> as.POSIXct( sometimes, origin='1970-01-01', tz='GMT')
[1] "1970-01-01 GMT" "1970-01-02 GMT" "1970-01-03 GMT" "1970-01-04
2005 Oct 17
1
as.POSIXct before and after 1970
Can someone, please, explain the difference in as.POSIXct results
before 1970 and on and after 1970 as illustrated below.
After 1970, the use of 'EST' or "EST+5EDT' as the timezone does not
affect the result of asPOSIXct, but before 1970 on 10/28 the results
are different.
> as.POSIXct('1970-10-29', tz='EST')+1
[1] "1970-10-29 00:00:01 EST"
>
2006 Aug 23
1
how to get a histogram of an POSIXct vector ?
Hi,
search on web indicates that R also includes a hist method on POSIXct
vectors.
My (perhaps too unexperienced) approach below yields an error.
Could somebody give me a hint what's wrong ?
Peter
> str(samples)
`data.frame': 7500 obs. of 1 variable:
$ DateTime:'POSIXct', format: chr "2006-07-20 00:10:08" "2006-07-20
00:11:17" "2006-07-20
2011 Aug 24
1
as.numeric() and POSIXct format
Hi!
I'm confused by this:
> as.numeric(as.POSIXct(518400,origin="2001-01-01"))
[1] 978822000
I guess the problem is that as.numeric() assumes a different origin, but cannot find
any default origin.
How can I get back the seconds from the POSIXct format? In other words, which
the inverse function of as.POSIXct()?
I've tried as.numeric and unclass() using a origin=
2004 May 07
0
loess and as.POSIXct
Hi there fellow R-users,
I have just upgraded to R version 1.9.0 from R version 1.7.1 for Windows.
Im trying to use the loess smoother where the X-variable is an as.POSIXct
variable.
The following works fine with R1.7.1 but not with R1.9.0.
Here is the example:
dates<-c('2003-08-03','2003-08-10','2003-08-17','2003-08-24','2003-08-31','2
2006 Oct 04
2
integers to POSIXct
What is the recommended way to convert/coerce and integer to a POSIXct
please?
d <- as.POSIXct(Sys.Date())
i <- as.integer(d)
as.POSIXct(i)
Error in as.POSIXct.default(i) : do not know how to convert 'i' to class
"POSIXlt"
This appears to be the behaviour in 2.3.1 and 2.4.0 on windows XP.
I have tried searching on this and found as.Date.integer in package zoo
which
2010 Apr 23
1
segfault with format.POSIXct()
Hi,
I posted in R-devel, thinking it might be a general R problem, but Uwe
cannot reproduce it in his GNU/Linux distro, with the same R version.
So I'm posting here to ask whether Debian R users are having this
problem.
I'm getting a segmentation fault as follows:
---<--------------------cut here---------------start------------------->---
R> begt <-
2001 Oct 09
0
Problems merging with POSIXct objects and all = TRUE (PR#1121)
I am having problems using merge with all = TRUE when one of the dataframes has
objects of class POSIXct. Here is an example:
> version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
major 1
minor 3.0
year 2001
2004 Jun 13
1
can't create a POSIXct from an actual Unix timestamp (PR#6975)
Full_Name: Philip Gross
Version: 1.9.0
OS: Linux Redhat 9.0
Submission from: (NULL) (65.57.245.11)
Among the many conversions for POSIXct values, there does not seem to be one
which will accept an actual POSIX timestamp, e.g. as produced by MySQL's
UNIX_TIMESTAMP() function. I have fixed this by adding the following lines to
R-1.9.0/src/library/base/R/datetime.R , at line 89: