Displaying 6 results from an estimated 6 matches for "keyby".
Did you mean:
kdyby
2014 Mar 15
0
allocation error and high CPU usage from kworker and migration: memory fragmentation?
...e, parent, by=c('store', 'year') # adds parent
column, an integer
setkeyv(move, by)
# this reduces move to a data.table with at most 6000 rows, but
always 4 columns
move <- move[, list(revenue=sum(price*units),
revenue_PL=sum(price*units*is_PL)),
keyby=by]
move[, category := gsub(search, replace, filename)]
return(move)
}
--
James Sams
sams.james at gmail.com
2012 Oct 26
3
how to make simulation faster
Dear R users,
I need to run 1000 simulations to find maximum likelihood estimates. I
print my output as a vector. However, it is taking too long. I am running 50
simulations at a time and it is taking me 30 minutes. Once I tried to run
200 simulations at once, after 2 hours I stopped it and saw that only about
40 of them are simulated in those 2 hours. Is there any way to make my
simulations
2013 Aug 30
0
ddply for comparing simulation results
...>> Loading required package: data.table
>> data.table 1.8.8 For help type: help("data.table")
>> > system.time({
>> + df_leads <- data.table(df_leads)
>> + df_leads_sum <- df_leads[
>> + , list(count = .N)
>> + , keyby = c('isSimulated', 'userId')
>> + ]
>> + })
>> user system elapsed
>> 0.75 0.01 0.76
>> >
>> > head(df_leads_sum)
>> isSimulated userId count
>> 1: 0 1 5
>> 2: 0 2...
2018 Nov 29
3
Unexpected argument-matching when some are missing
On Thu, Nov 29, 2018 at 10:51 AM S Ellison <S.Ellison at lgcgroup.com> wrote:
>
> > When trying out some variations with `[.data.frame` I noticed some (to me)
> > odd behaviour,
>
> Not just in 'myfun' ...
>
> plot(x=1:10, y=)
> plot(x=1:10, y=, 10:1)
>
> In both cases, 'y=' is ignored. In the first, the plot is for y=NULL (so not
2013 Apr 29
3
Counting number of consecutive occurrences per rows
Hi,
I would appreciate if somebody could help me with following calculation.
I have a dataframe, by 10 minutes time, for mostly one year data. This is
small example:
> dput(test)
structure(list(jul = structure(c(14655, 14655, 14655, 14655,
14655, 14655, 14655, 14655, 14655, 14655, 14655, 14655, 14655,
14655, 14655, 14655), origin = structure(0, class = "Date")),
time =
2013 Jul 12
4
simplify a dataframe
Hello
I have the following problem : group the lines of a dataframe when no
information change (Matricule, Nom, Sexe, DateNaissance, Contrat, Pays)
and when the value of Debut of lines i = value Fin of lines i-1
I can obtain it with a do loop. Is it possible to avoid the loop ?
The dataframe initial is df1
dput(df1)
structure(list(Matricule = c(1L, 1L, 1L, 6L, 6L, 6L, 6L, 6L,
6L, 8L, 8L, 8L,