Displaying 20 results from an estimated 124 matches for "agg".
Did you mean:
ag
2012 May 08
2
How to deal with a dataframe within a dataframe?
Hello all,
I am doing an aggregation where the aggregating function returns not a
single numeric value but a vector of two elements using return(c(val1,
val2)). I don't know how to access the individual columns of that
vector in the resulting dataframe though. How is this done correctly?
Thanks, robert
> agg <- agg...
2009 Mar 30
3
Calculating First Occurance by a factor
...d to be done by each Trial (Tr) and each Subject
Number (Sub). FixInx is essentially the number of rows in a trial. The
resulting data.frame is below.
Sub Tr IA FirstFixTime
p1 t1 1 200
p1 t1 2 350
p1 t1 3 600
p1 t1 4 850
p1 t1 5 1350
Here is the solution I have now.
agg = aggregate(data$FixInx, list(data$Sub, data$Tr, data$IA), min) #get the
minimum fix index by Sub, Tr, and IA... I can use this min fix index to pull
out the desired fixtime
agg$firstfixtime = 0 # new column for results
for (rown in 1:length(rownames(agg))){ #cycle through rows and get each
data$...
2006 Sep 21
1
transforming factor back to numbers
Hi
I generate a new dataframe by doing:
npl.agg <- aggregate(npl$DensPlants, list(year=npl$year, sim=npl$sim),
mean, na.rm=TRUE )
Now I want to plot it by using
coplot(npl.agg$x ~ npl.agg$year | npl.agg$sim, type="l")
but, as npl.agg$year is seen as a factor, the order of the points on the
x-axis (time axis) does not follow the...
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...etIndexedType(const Type *Ptr,
- Value* const *Idxs,
- unsigned NumIdx) {
- const PointerType *PTy = dyn_cast<PointerType>(Ptr);
- if (!PTy) return 0; // Type isn't a pointer type!
- const Type *Agg = PTy->getElementType();
-
- // Handle the special case of the empty set index set...
- if (NumIdx == 0)
- return Agg;
-
- unsigned CurIdx = 1;
- for (; CurIdx != NumIdx; ++CurIdx) {
- const CompositeType *CT = dyn_cast<CompositeType>(Agg);
- if (!CT || isa<PointerType>(...
2008 Aug 12
2
perl expression question
I have a string such as
fileName<-"Agg.20.20.20-all-01".
All I want to do is pull the "20.20.20" and the "all" as strings.
Obviously, they aren't always those values.
The "20.20.20" can be "30.30.30" but it's always after the . which is
next to the second g in Agg and it's alw...
2011 Oct 06
2
[LLVMdev] A potential bug
Hi all,
There might be a bug in DeadStoreElimination.cpp. This pass eliminates
stores backwards aggressively in an end BB. It does not check dependencies
on stores in an end BB though. For example, in this code snippet:
...
1. %sum.safe_r47.pre-phi = phi i64* [ %sum.safe_r47.pre,
%entry.for.end_crit_edge ], [ %sum.safe_r42, %for.body ]
2. %call9 = call i32 @gettimeofday(%struct.timeval* %end,...
2011 Oct 06
2
[LLVMdev] A potential bug
...n Thu, Oct 6, 2011 at 2:20 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Oct 6, 2011 at 2:12 PM, Zeng Bin <ezengbin at gmail.com> wrote:
>> Hi all,
>>
>> There might be a bug in DeadStoreElimination.cpp. This pass eliminates
>> stores backwards aggressively in an end BB. It does not check dependencies
>> on stores in an end BB though. For example, in this code snippet:
>> ...
>> 1. %sum.safe_r47.pre-phi = phi i64* [ %sum.safe_r47.pre,
>> %entry.for.end_crit_edge ], [ %sum.safe_r42, %for.body ]
>> 2. %call9 =...
2007 Aug 08
2
Relocating Axis Label/Title --2
...previous mail (I sent it off too early by mistake).
This is the correct example:
rm(list=ls())
D_mean<-seq(-5,5,length=100)
y<-exp(-D_mean^2/5)
pdf("my.pdf")
plot(D_mean,y,type="l",yaxt="n",lty=2,lwd=2,col="black",
ylab = list(expression(paste(dN/dlogD[agg]," ["*cm^-3*"]"))),
xlab = expression(paste(D[agg]," [nm]")),
cex.lab=1.2
)
axis(2, mgp=c(0, 0.2, -2))
dev.off()
With mgp() I can tune the distance between the ticks and the tick
labels, but how can I move the axis label? I would like to move the
one along y to visua...
2008 Jul 16
3
[LLVMdev] GEP::getIndexValid() with other iterators
Hi all,
currently, GetElementPtrInst has a method getIndexedType, which has a
templated variant. You pass in a begin and an end iterator, and it will find
the indexed type for those. However, both iterators must iterate over Value*.
For some argpromotion code, I would like to pass in iterators that iterate
over unsigneds instead of Value*. I currently solve this by transforming my
2011 Oct 06
0
[LLVMdev] A potential bug
On Thu, Oct 6, 2011 at 2:12 PM, Zeng Bin <ezengbin at gmail.com> wrote:
> Hi all,
>
> There might be a bug in DeadStoreElimination.cpp. This pass eliminates
> stores backwards aggressively in an end BB. It does not check dependencies
> on stores in an end BB though. For example, in this code snippet:
> ...
> 1. %sum.safe_r47.pre-phi = phi i64* [ %sum.safe_r47.pre,
> %entry.for.end_crit_edge ], [ %sum.safe_r42, %for.body ]
> 2. %call9 = call i32 @gettimeofd...
2007 Jul 13
2
Suggestion to extend aggregate() to return multiple and/or named values
Hi all,
This is my first post to the developers list. As I understand it,
aggregate() currently repeats a function across cells in a dataframe
but is only able to handle functions with single value returns.
Aggregate() also lacks the ability to retain the names given to the
returned value. I've created an agg() function (pasted below) that is
apparently backwards...
2001 Oct 30
2
creating chron object aggregates (e.g. sums by day)
What is the recommended/optimal way to perform aggregates on data frames
with chron objects?
Here is an example:
>raw.data
1 07/09/01 4000
2 07/09/01 2000
3 07/11/01 1000
4 07/13/01 800
5 07/13/01 700
6 07/16/01 600
7 07/17/01 500
I'm trying to construct a function that would first aggregate the data
(second column) by day (...
2011 Oct 06
0
[LLVMdev] A potential bug
...Eli Friedman <eli.friedman at gmail.com>
> wrote:
> > On Thu, Oct 6, 2011 at 2:12 PM, Zeng Bin <ezengbin at gmail.com> wrote:
> >> Hi all,
> >>
> >> There might be a bug in DeadStoreElimination.cpp. This pass eliminates
> >> stores backwards aggressively in an end BB. It does not check
> dependencies
> >> on stores in an end BB though. For example, in this code snippet:
> >> ...
> >> 1. %sum.safe_r47.pre-phi = phi i64* [ %sum.safe_r47.pre,
> >> %entry.for.end_crit_edge ], [ %sum.safe_r42, %for.body...
2010 Mar 04
0
ifthen() question -- whoops--ifelse()
OK, I got it figured out. I was not keying into a length greater than 1, so:
# I added this object and placed it into the iftelse statement:
lid <- sum(match(id, st[i], nomatch = 0))
out$var.g[i]<-ifelse(lid ==1, meta$var.g[id==st[i]],
aggs(g=g[id==st[i]],
n.1= n.1[id==st[i]],
n.2 = n.2[id==st[i]], cor)[2])
#full function:
agg_g <- function(meta,var.g, id, g, n.1, n.2, cor = .50) {
meta$var.g <- var.g
st <- unique(id)
out <- data.frame(id=rep(NA,length(st)))
f...
2011 Oct 06
1
[LLVMdev] A potential bug
...iedman at gmail.com>
>> wrote:
>> > On Thu, Oct 6, 2011 at 2:12 PM, Zeng Bin <ezengbin at gmail.com> wrote:
>> >> Hi all,
>> >>
>> >> There might be a bug in DeadStoreElimination.cpp. This pass eliminates
>> >> stores backwards aggressively in an end BB. It does not check
>> >> dependencies
>> >> on stores in an end BB though. For example, in this code snippet:
>> >> ...
>> >> 1. %sum.safe_r47.pre-phi = phi i64* [ %sum.safe_r47.pre,
>> >> %entry.for.end_crit_edge...
2013 Nov 07
1
problem with interaction in lmer even after creating an "interaction variable"
...ror in lme4::lFormula(formula = biomass ~ home + garden:gebiet + (1 | :
rank of X = 28 < ncol(X) = 30/
In the lmer help I found out that if not all combination of the interaction
are realized, lmer has problems and one should do new variable using
"interaction", which I did:
/
arr$agg <- interaction (arr$gebiet, arr$garden, drop = TRUE)/
when I fit the interaction term now:
/
lmer (biomass ~ home + agg+ ( 1|Block), data = arr)/
The error does not change:
/
Error in lme4::lFormula(formula = biomass ~ home + agg + (1 | Block), :
rank of X = 28 < ncol(X) = 29/
No NAs...
2010 Mar 04
1
ifthen() question
Hi All,
I am using a specialized aggregation function to reduce a dataset with
multiple rows per id down to 1 row per id. My function work perfect when
there are >1 id but alters the 'var.g' in undesirable ways when this
condition is not met, Therefore, I have been trying ifthen() statements to
keep the original value when...
2012 Jan 19
8
sumarizar
...onth<-as.Date(EUR.resto$month)
ahora necesito agrupar mis datos por mes-años (01-mes-año) y obtener su
valor medio. En SAS haría un proc summary donde obtendría una nueva tabla
con menos registros ya que estarían agrupados por mes. Que función en R
puedo usar equivalente a esta?
Si uso: eur.agg<-aggregate(EUR.resto$Yenes.japoneses.por.Euro,
by=list(EUR.resto$month),FUN=mean) me da error.
Gracias por vuestra ayuda,
un saludo,
Otto
*
[[alternative HTML version deleted]]
2004 Jun 15
3
slope estimations of teeth like data
...all
Suppose I have teeth like data similar like
x <- 1:200
y <- 0.03*x[1:100]+rnorm(100, mean=.001, sd=.03)
z <- 3-rep(seq(1,100,10),each=10)*.03+rnorm(100,mean=.001, sd=.03)
plot(x,c(y,z))
and I want to have a gradient estimations for some values from increasing part of
data
like
y.agg <- aggregate(diff(c(y,z)), list(rep(seq(1,200,10),each=10)[1:199]), mean)
y.agg[1:10,] ##is OK, I want that
y.agg[11:20,] ##is not OK, I do not want that
actual data are similar but more irregular and have subsequent gradual increases
and decreases, more like
set.seed(1)
yy<-NULL
for( i...
2007 Nov 06
1
[LLVMdev] Passing and returning aggregates (who is responsible for the ABI?)
On 6 nov. 07, at 06:17, Chris Lattner wrote:
>> But then, why refuse aggregates as input or output of a call? What is
>> the rationale?
>
> Because LLVM has no notion of aggregates as "values" that can be
> passed around as atomic units. This is a very important design point,
> and has many useful values.
I see. You explained one of them in...