similar to: range() for Date and POSIXct could respect `finite = TRUE`

Displaying 20 results from an estimated 10000 matches similar to: "range() for Date and POSIXct could respect `finite = TRUE`"

2023 Apr 28
1
range() for Date and POSIXct could respect `finite = TRUE`
A tiny nit-pick: Seems to me that end date = NA would mean the event has not yet ended, whilst Inf would mean that the event is known to never terminate, ie: an eternal fact, or physical law. On Fri, Apr 28, 2023 at 10:12?AM Davis Vaughan via R-devel < r-devel at r-project.org> wrote: > Hi all, > > I noticed that `range.default()` has a nice `finite = TRUE` argument, > but it
2023 May 19
1
range() for Date and POSIXct could respect `finite = TRUE`
Hi All, I think there may be some possible confusion about what allowsInf would be reporting (or maybe its just me :) ) if we did this. Consider a class "myclass", S3, for starters, with setMethod("allowsInf", "myclass", function(obj) FALSE) Then, what would myclassthing <- structure(1.5, class = "mything") myclassthing[1] <- Inf do. Assumely it
2018 May 16
2
Date method of as.POSIXct does not respect tz
R 3.5.0 Is it intended that the Date method of as.POSIXct does not respect the tz parameter? I suggest changing as.POSIXct.Date to this: function (x, tz = "", ...) .POSIXct(unclass(x) * 86400, tz = tz) Currently, the best workaround seems to be using the character method if one doesn't want the default timezone (which is often an annoying DST timezone). This came up on
2004 Aug 19
2
proposed change to [.POSIXct
R developers, The "tzone" attribute is stripped from a POSIXct object when the subscript command is called ("[.POISXct"). This results in dates being printed in the locale specific format after a subscript operation is applied to a POSIXct object which has cause several problems for me in the past. Here is an example of this problem under R 1.9.1: > x <-
1999 Jul 15
1
R: ts - objects
Hello, I faced some difficulties using time series objects. ---------------------------------------------------------------------------- 1. Why is the time data changed, when I, e.g., apply sqrt(arrts), but not when arrts^0.5 ? This is my examples time series: ---------------------------------------------------------------------------- > arrts Time Series: Start = 3 End = 23 Frequency
2008 Feb 16
3
Arithmetic bug? (found when use POSIXct) (PR#10776)
Full_Name: Bo Zhou Version: 2.6.1 (2007-11-26) OS: Windows XP Submission from: (NULL) (207.237.54.242) Hi, I found an arithmetic problem when I'm doing something with POSIXct The code to reproduce it is as follows (This is the recommended way of finding out time zone difference on R News 2004-1 Page 32 URL http://cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf) a=Sys.time()
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=
2017 Oct 23
2
range function with finite=T and logical parameters
Hi! I was wondering about the behavior of the range function wrt. logical NAs: > range(c(0L, 1L, NA), finite=T) [1] 0 1 > range(c(F, T, NA), finite=T) [1] NA NA The documentation is quite clear that "finite = TRUE includes na.rm = TRUE?, so that I would have assumed that these two snippets would produce the same result. - Lukas
2010 Feb 01
1
Error with cut.POSIXt and daylight savings time switchover dates
The following code: cut(as.POSIXct("2009-11-01 04:00:00", tz="America/Los_Angeles"), "1 day") gives the error: Error in seq.int(0, to - from, by) : 'to' must be finite This is related to November 1st, 2009 being the switchover date from daylight savings time to standard time in the America/Los_Angeles time zone. In particular, in cut.POSIXt, the starting
2019 May 01
3
anyNA() performance on vectors of POSIXct
Inside of the anyNA() function, it will use the legacy any(is.na()) code if x is an OBJECT(). If x is a vector of POSIXct, it will be an OBJECT(), but it is also TYPEOF(x) == REALSXP. Therefore, it will skip the faster ITERATE_BY_REGION, which is typically 5x faster in my testing. Is the OBJECT() condition really necessary, or could it be moved after the switch() for the individual TYPEOF(x)
2009 Oct 15
2
forwarded: bug (?) in cut.POSIXt with "breaks"=integer
From: Vitalie S. <vitosmail <at> rambler.ru> Subject: Bug in cut.POSIXt Newsgroups: gmane.comp.lang.r.general Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago) Hello Everyone, Before reporting decided to post here first: tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class = c("POSIXt",
2003 Jan 03
4
as.POSIXct problem?
Under platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 6.1 year 2002 month 11 day 01 language R > x <- strptime(c('10/10/1969','12/31/2002'),format='%m/%d/%Y')
2003 Feb 09
1
is.finite() of a list
> ?is.finite `is.finite' and `is.infinite' return a vector of the same length as `x', indicating which elements are finite or not. is.finite() of a list seems to return a vector of the length of the list, but with value FALSE if any list element isn't finite. Is this intended? > l4 <- list(NA,1,2,3); l4; length(l4); is.finite(l4) [[1]] [1] NA [[2]] [1] 1
2004 Apr 23
4
is.na(valid_date) too often true on SGI MIPS (PR#6814)
Full_Name: George N. White III Version: 1.9.0 OS: Irix 6.5.21m Submission from: (NULL) (142.176.61.212) R-1.9.0 built using the SGI MIPSPro compilers Installation directory: /usr/local C compiler: c99 -OPT:IEEE_NaN_inf=ON -mips4 -n32 -O3 -OPT:Olimit_opt=on C++ compiler: CC -OPT:IEEE_NaN_inf=ON -mips4 -n32 -O3 -OPT:Olimit_opt=on -LANG:std Fortran compiler:
2006 Jan 24
1
non-finite finite-difference value[]
Dear R-helpers, running a zeroinflated model of the following type: zinb = zeroinfl(count=response ~., x = ~ . - response, z = ~. - response, dist = "negbin", data = t.data, trace = TRUE) generates the following message: Zero-Inflated Count Model Using logit to model zero vs non-zero Using Negative Binomial for counts dependent variable y: Y 0 1 2 3 359 52 7 3 generating
2011 Nov 16
1
"Non-finite finite-difference value" error in eha's aftreg
Hi list! I'm getting an error message when trying to fit an accelerated failure time parametric model using the aftreg() function from package eha: > Error in optim(beta, Fmin, method = "BFGS", control = list(trace = > as.integer(printlevel)), : > non-finite finite-difference value [2] This only happens when adding four specific covariates at the same time in the
1999 Apr 10
1
R/S compatibility in passing a formula
In S3 if you are passing an evaluated formula to another function that will store it and use it in printing (such as a model-fitting function), you usually want to unclass the formula. Otherwise, the formula that gets stored looks very ugly when printed. A trick to do the unclassing is to pass form = c( myFormula ) In R this has the effect of making form a list rather than a call. It seems
2011 Jun 22
1
numerical integration and 'non-finite function value' error
Dear R users, I have a question about numerical integration in R. I am facing the 'non-finite function value' error while integrating the function xf(x) using 'integrate'. f(x) is a probability density function and assumed to follow the three parameter (min = 0) beta distribution for which I have estimated the parameters. The function is integrated
2008 Dec 24
1
Non-finite finite difference error
Hello, I'm trying to use fitdistr() from the MASS package to fit a gamma distribution to a set of data. The data set is too large (1167 values) to reproduce in an email, but the summary statistics are: Min. 1st Qu. Median Mean 3rd Qu. Max. 116.7 266.7 666.7 1348.0 1642.0 16720.0 The call I'm trying to make is: fitdistr(x,"gamma") and the error is: Error in optim(x =
2011 Feb 02
2
clustering with finite mixture model
Dear R-help, I am doing clustering via finite mixture model. Please suggest some packages in R to find clusters via finite mixture model with continuous variables. And also I wish to verify the distributional properties of the mixture distributions by fitting the model with lognormal, gamma, exponentials etc,. Thanks in advance,  warm regards,Ms.Karunambigai M PhD Scholar Dept. of Biostatistics