Dear r-users,
I would like to construct 3-day moving average for block maxima series.
I tried this:
bmthree <- lapply(split(dt, dt$Year), function(x) max(sapply(1:(nrow(x)-2),
function(i) with(x, mean(Amount[i:(i+2)],na.rm=TRUE)
bmthree
and got the following output.
Hola.
Yo no he usado el paquete antes y es altamente probable que esté
entendiendo mal la pregunta pero intentaré responder.
Me parece que el argumento principal de las funciones del paquete son un
vector o una serie de tiempo. Dependiendo de cuál función te estés
refiriendo pudiera haber un
1. Please always reply to the list, especially here so that others can
see your clarification.
2. What happens if your match.start value exceeds all the cumulative
sums?? -- you seem to imply that this cannot happen.
Your minimal example, while a little confusing (to me) and in html --
this can
This is a plain text email list. Please learn how to explain this to your
email client because what YOU saw before you sent it is not what WE saw
after it bounced through the mailing list, and that can lead to
misunderstandings.
If at all possible you should try to augment your table with an
Hello,
I have a following dataframe with many rows.
data.frame(match.start=c(5,10,100,200),range.coordinates=c("1000-1050","1500-1555","5000-5050,6000-6180","100-150,200-260,600-900"))
match.start range.coordinates
5 1000-1050
10 1500-1555
On Thu, Jul 20, 2017 at 10:53 AM, Marc Schwartz wrote:
>
>> On Jul 20, 2017, at 7:53 AM, Larry Martell wrote:
>>
>> I need to install rpy2 on RHEL6. The version of R in the 6 repos is
>> 3.0, and rpy2 does not work with that version. I installed R
Dear fellow R users,
I am experiencing some problem using function mclapply from recommended R
package parallel. This problem is a bit "deep in source code" (maybe r-devel
list would be more appropriate ?).
Actually, I have noticed on a specific Linux HPC system that the various
readChild()
Hola estimados.
Alguien ha utilizado alguna vez el paquete IMPUTE_TS?
La verdad es que es bastante recomendable, sin embargo hay un tema que no he
podido resolver.
El programa te entrega los resultados en la consola...sin embargo, la idea es
rellenar los (N.A) del dataset ORIGINAL.
La
It is known (several discussions on internet) that axis() cannot be used
after fields:::image.plot() (axis() shows nothing).
However, if points(1.5, 1.5, type="p") is inserted before the axis()
finctions, it works.
I have investigated what points(1.5, 1.5, type="p") is doing to allow
axis
Hi Elie,
Thanks for your time and efforts. I plugged in the calculation I wanted to do
in the code you provided and got I wanted perfectly. Below is the solution to
my original problem.
# dataset
dem<- structure(list(id = c("L1", "L2", "L3", "M1", "M2", "M3"), TEST_SET_NAME
= c("A",
"A",
Hi,
I don't know about the lazyeval package or what you are trying to do but to
answer the main question "How to create columns dynamically using a
function?" I would do something like that:
# dataset
dem <- structure(list(id = c("L1", "L2", "L3", "M1", "M2", "M3"),
TEST_SET_NAME = c("A",
"A",
11 matches
Mail list logo