similar to: lag() not returning a time series object

Displaying 20 results from an estimated 10000 matches similar to: "lag() not returning a time series object"

2010 Dec 21
2
Warning message when items of Hmisc are masked by loading a package.
I've noticed that I get a warning message every time a package masks some functions from Hmisc. The warning message says : Warning message: In identical(get(., i), get(., lib.pos)) : ignoring non-pairlist attributes This happens with eg: library(plyr) library(xtable) I think I've seen this passing by before, but I'm not sure any more. Just thought I'd mention it. Cheers Joris
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
?typeof? is your friend here: > typeof(`[`) [1] "special" > typeof(mc[[1]]) [1] "symbol" > typeof(mc2[[1]]) [1] "special" so mc[[1]] is a symbol, and thus not a primitive. - Lukas > On 28 Mar 2017, at 14:46, Michael Lawrence <lawrence.michael at gene.com> wrote: > > There is a difference between the symbol and the function (primitive >
2010 Jul 05
2
timeseries
Dear useRs, I am trying to construct a time series using as.ts function, surprisingly when I plot the data the x axis do not show the time in years, however if I use ts(data), time in years are shown in the x axis. Why such difference in the results of both the commands Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma
2016 Sep 06
2
The use of match.fun
Dear gurus, I was utterly surprised to learn that one of my examples illustrating the need of match.fun() doesn't give me the expected result. center <- function(x,FUN) FUN(x) center(1:10, mean) mean <- 4 center(1:10, mean) Used to give me the error message "could not find function FUN". Now it just works, even though I didn't expect it to. I believe this is at least
2010 Mar 30
2
weighted.median function from package R.basic
Dear all, I want to apply a weighted median on a huge dataset, and I remember a function from the package R.basic that could do this using an internal sorting algorithm qsort. This speeded things up quite a bit. Alas, I can't find that package anywhere anymore. There is a weighted.median function in the package limma too, but I didn't use that before. Anybody who knows what happened to
2014 Oct 03
2
How I() works in a formula
Dear all, I'm updating a package regarding a new type of models, and I'm looking to extend the formula interface with two functions (L() and R() ) for construction of these models. I want to use as much of the formula interface as possible, and hoped to do something similarly to I(). I know the I() function does nothing more than add the class "AsIs". I've been browsing the
2011 Feb 04
2
terribly annoying bug with POSIXlt : one o'clock is midnight?
Apparently, as.POSIXlt takes one o'clock as the start of the day : > as.POSIXlt(0,origin="1970-01-01") [1] "1970-01-01 01:00:00 CET" > as.POSIXlt(0,origin="1970-01-01 00:00:00") [1] "1970-01-01 01:00:00 CET" > as.POSIXlt(0,origin="1970-01-01 23:59:59") [1] "1970-01-02 00:59:59 CET" Cheers -- Joris Meys Statistical
2015 Apr 01
1
evaluation in transform versus within
On 01/04/2015 2:33 PM, Joris Meys wrote: > Thank you for the insights. I understood as much from the code, but I > can't really see how this can cause a problem when using with() or > within() within a package or a function. The environments behave like > I would expect, as does the evaluation of the arguments. The second > argument is supposed to be an expression, so I
2010 Jul 28
1
strange error : isS4(x) in gamm function (mgcv package). Variable in data-frame not recognized???
Dear all, I run a gamm with following call : result <- try(gamm(values~ s( VM )+s( RH )+s( TT )+s( PP )+RF+weekend+s(day)+s(julday) ,correlation=corCAR1(form=~ day|month ),data=tmp) )" with mgcv version 1.6.2 No stress about the data, the error is not data-related. I get : Error in isS4(x) : object 'VM' not found What so? I did define the dataframe to be used, and the
2017 May 18
2
[R] R-3.4.0 fails test
> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: > > Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes from origin, as explained in my previous mail) > I would suspect that there is something more subtle
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
Dear, I have noticed this problem while looking at the following question on Stackoverflow : http://stackoverflow.com/questions/42894213/s4-class-subset-inheritance-with-additional-arguments While going through callNextMethod, I've noticed the following odd behaviour: mc <- call("[",iris,2,"Species") mc[[1]] ## `[` is.primitive(`[`) ## [1] TRUE
2017 Jun 27
2
texi2pdf doesn't find the correct MikTex installation due to erroneous Sys.which()
I checked after this question popped up on Stackoverflow: https://stackoverflow.com/questions/44785961/compile-pdf-in-rstudio-works-but-knit2pdf-does-not-work-in-r-or-rstudio On Windows, texi2pdf looks for the texify.exe of Miktex, but looks in a very wrong place: > Sys.which("texify") texify
2017 Sep 28
5
Duncan's retirement: who's taking over Rtools?
Dear dev team, I was sorry to see the announcement of Duncan about his retirement from maintaining the R Windows build and Rtools. Duncan, thank you incredibly much for your 15 years of devotion and your impressive contribution to the R community as a whole. Thinking about the future, I wondered whether there were plans for the succession of Duncan. Is it the intention to continue providing
2017 May 31
4
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Seriously, if a method gives a wrong result, it's wrong. line() does NOT implement the algorithm of Tukey, even not after the patch. We're not discussing Excel here, are we? The method of Tukey is rather clear, and it is NOT using the default quantile definition from the quantile function. Actually, it doesn't even use quantiles to define the groups. It just says that the groups
2015 Apr 01
4
evaluation in transform versus within
On 01/04/2015 1:35 PM, Gabriel Becker wrote: > Joris, > > > The second argument to evalq is envir, so that line says, roughly, "call > environment() to generate me a new environment within the environment > defined by data". I think that's not quite right. environment() returns the current environment, it doesn't create a new one. It is evalq() that created
2010 Jul 02
2
S4 classes and debugging - Is there a summary?
Dear all, I'm getting more and more frustrated with the whole S4 thing and I'm looking for a more advanced summary on how to deal with them. Often I get error messages that don't make sense at all, or the code is not doing what I think it would do. Far too often inspecting the code requires me to go to the source, which doesn't really help in easily finding the bit of code
2014 Oct 17
2
Most efficient way to check the length of a variable mentioned in a formula.
Dear R gurus, I need to know the length of a variable (let's call that X) that is mentioned in a formula. So obviously I look for the environment from which the formula is called and then I have two options: - using eval(parse(text='length(X)'), envir=environment(formula) ) - using length(get('X'), envir=environment(formula) ) a bit of
2017 May 18
2
[R] R-3.4.0 fails test
This has to do with your own timezone. If I run that code on my computer, both formats are correct. If I do this after Sys.setenv(TZ = "UTC") Then: > cbind(format(dlt), format(dct)) [,1] [,2] [1,] "2016-12-06 21:45:41" "2016-12-06 20:45:41" [2,] "2016-12-06 21:45:42" "2016-12-06 20:45:42" The reason for that, is that
2015 Apr 01
2
evaluation in transform versus within
Dear list members, I'm a bit confused about the evaluation of expressions using with() or within() versus subset() and transform(). I always teach my students to use with() and within() because of the warning mentioned in the helppages of subset() and transform(). Both functions use nonstandard evaluation and are to be used only interactively. I've never seen that warning on the help
2011 Feb 15
1
Using rasterImage on a CairoWin device prevents adding further elements to device?
I was pointed to the Cairo package for plotting PNG images on a device. I've been playing around with it, but found that after I use the rasterImage function, I can't add anything any more to the device, eg : img <- readPNG(system.file("img", "Rlogo.png", package="png")) r = as.raster(img[,,1:3]) r[img[,,4] == 0] = "white" CairoWin()