Displaying 20 results from an estimated 100 matches similar to: "inefficient for loop, is there a better way?"
2009 Dec 01
0
[LLVMdev] Possible bug in ExpandShiftWithUnknownAmountBit
On Mon, Nov 30, 2009 at 7:22 PM, Javier Martinez <javier at jmartinez.org> wrote:
> Hello,
>
> I'm working in adding support for 64-bit integers to my target. I'm using
> LLVM to decompose the 64-bit integer operations by using 32-bit registers
> wherever possible and emulating support where not. When looking at the bit
> shift decomposition I saw what seems to be a
2009 Dec 01
4
[LLVMdev] Possible bug in ExpandShiftWithUnknownAmountBit
Hello,
I'm working in adding support for 64-bit integers to my target. I'm using
LLVM to decompose the 64-bit integer operations by using 32-bit registers
wherever possible and emulating support where not. When looking at the bit
shift decomposition I saw what seems to be a bug in the implementation. The
affected function is ExpandShiftWithUnknownAmountBit in
LegalizeIntegerTypes.cpp.
2009 Apr 07
1
use the value of variable to quote certain elements in matrix
Hi, I want to use the value of variable to quote elements in matrix.
For example, I have a matrix like:
y1 y2m1 1 2m2 3 4
where y1,y2,m1,m2 are column and row names. I have two random character variable, say x, that could be either y1 or y2 and y that could be either m1 or m2. So can I do like Matrix[y,x] to quote elements? I've tried this
2012 Sep 02
2
[LLVMdev] branch on vector compare?
Hi all, llvm newbie here.
I'm trying to branch based on a vector compare. I've found a slow way (below)
which goes through memory. Is there some idiom I'm missing so that it would use
for instance movmsk for SSE or vcmpgt & cr6 for altivec?
Or do I need to resort to calling the intrinsic directly?
Thanks,
Stephen.
%16 = fcmp ogt <4 x float> %15, %cr
%17 =
2012 Apr 05
2
count() function
I keep expecting R to have something analogous to the =count function in
Excel, but I can't find anything. I simply want to count the data for a
given category.
I've been using the ddply() function in the plyr package to summarize
means and st dev of my data, with this code:
ddply(NZ_Conifers,.(ElevCat, DataSource, SizeClass), summarise,
avgDensity=mean(Density),
2012 Aug 07
5
summing and combining rows
Hello,
I have a data set that needs to be combined so that rows are summed by a
group based on a certain variable. I'm pretty sure rowsum() or rowsums()
can do this but it's difficult for me to figure out how it will work for
my data based on the examples I've read.
My data are structured like this:
Plot SizeClass Stems
12 Class3 1
12 Class4
2010 Jun 01
1
loop
Can any one help it will be very kind, loop statements
I have this table and some more records, I want to reshape it
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
TP53 Dis1 Dis2 Dis3 Dis4 Dis5 Dis6
DCI New1 New2 New3 New4
FDI Hi2 H3 H4
GHD I1 I3 I4 I5 I6 I7 I8
I want my new table or matrix to be some thing like this
V1 V2 V3
Tp53 Dis1 Dis2
Tp53 Dis1 Dis3
Tp53 Dis1 Dis4
Tp53 Dis1 Dis5
Tp53 Dis1 Dis6
Tp53 Dis2
2013 Feb 15
1
Fitting pareto distribution / plotting observed & fitted dists
Some background: I have some data on structural dependencies in a base
of code artifacts. The dependency structure is reflected in terms of
relative node degrees, with each node representing some code unit (just
as an example).
This gives me real data of the following form (sorry for the longish
posting):
dat1 <-
c(0.00245098039215686, 0, 0, 0, 0, 0, 0, 0, 0.0563725490196078,
0, 0, 0,
2004 Dec 12
1
Followed John's book, frustrating smbldap-problem
Hi all, Im having a hard time figuring whats wrong with my Samba-ldap
setup. I hope somebody may point out the error.
I've set it up according to John H. Terpstra's excellent "Samba 3 by
example". This book is also availible from samba.org, and chapter I'm
referencing is this:
http://us1.samba.org/samba/docs/man/Samba-Guide/happy.html
I followed the book character by
2012 Sep 03
0
[LLVMdev] branch on vector compare?
Hi Stephen,
> Hi all, llvm newbie here.
welcome!
> I'm trying to branch based on a vector compare. I've found a slow way (below)
> which goes through memory. Is there some idiom I'm missing so that it would use
> for instance movmsk for SSE or vcmpgt & cr6 for altivec?
I don't think you are missing anything: LLVM IR has no support for horizontal
operations like
2006 Feb 15
2
Xen source [signed]
I just also wanted to mention that I have the current released
source tarballs downloaded and placed at
http://people.debian.org/~jbouse/xen/ at this time. As the only way to
get the source tarballs I've found is via bittorrent unless you want to
give your email address I'll continue to keep the the current tarball
located there.
That is one thing that I noticed about Ralph's
2012 Mar 25
2
avoiding for loops
I have data that looks like this:
> df1
group id
1 red A
2 red B
3 red C
4 blue D
5 blue E
6 blue F
I want a list of the groups containing vectors with the ids. I am
avoiding subset(), as it is
only recommended for interactive use. Here's what I have so far:
df1 <- data.frame(group=c("red", "red", "red", "blue",
2000 Aug 01
0
anova() on three or more objects behaves inconsistently (PR#621)
anova() on three or more objects behaves inconsistently in R.
In R anovalist.lm does a sequential ANOVA using pairwise F tests,
ignoring all the other objects, so the larger of the two models
provides the denominator.
In S anova.lmlist uses the denominator from the largest model (smallest
residual df) in the set, as does anova.glmlist in both.
I suggest that R's anovalist.lm is wrong (that
2008 Feb 06
3
counting row repetitions without loop
Hi,
I have a data frame consisting of coordinates on a 10*10 grid, i.e.
> example
x y
1 4 5
2 6 7
3 6 6
4 7 5
5 5 7
6 6 7
7 4 5
8 6 7
9 7 6
10 5 6
What I would like to do is return an 10*10 matrix consisting of counts
at each position, so in the above example I would have a matrix where,
for example, cell [4,5] contains 2 and [6,7] contains 3. At the
2010 Sep 10
3
(no subject)
Hello,
I'm trying to do bar plot where 'sex' will be the category axis and
'occupation' will represent the bars and the clusters will represent
the mean 'income'.
sex occupation income
1 female j 12
2 male b 34
3 male j 22
4 female j 54
5 male b 33
6
2008 Oct 15
5
plot - central limit theorem
Hi,
Is there a way to simulate a population with R and pull out m samples,
each with n values
for calculating m means?
I need that kind of data to plot a graphic, demonstrating the central
limit theorem
and I don't know how to begin.
So, perhaps someone can give me some tips and hints how to start and
which functions to use.
thanks for any help,
joerg
2014 Jun 24
3
winbind: homeDirectory being ignored
Something strange here. User created using:
root at dc1:~# samba-tool user add user7 Abcd1234 --uid-number=1007
--home-directory=/home/user7 --login-shell=/bin/bash
User 'user7' created successfully
I can see the homeDirectory attribute in the entry. But the home
directory that winbind returns is just the template one:
root at adclient:~# getent passwd user7
2007 Sep 21
1
Stats 101 : lm with/without intercept
I am puzzled at the use of regression. I have a categorical variable
ClassePop33000 which factors a Population variable into 3 levels. I want to
investigate whether that categorical variable has some relation with my
dependent variable, so I go :
lm(Cout.ton ~ ClassePop33000, data=ech2)
Call:
lm(formula = Cout.ton ~ ClassePop33000, data = ech2)
Residuals:
Min 1Q Median 3Q
2009 Aug 27
1
standard error associated with correlation coefficient
I want the standard error associated with a correlation. I can calculate
using cor & var, but am wondering if there are libraries that already
provide this function.
[[alternative HTML version deleted]]
2010 May 05
1
Expressing z & t test data in a graph
How do u do this?
--
View this message in context: http://r.789695.n4.nabble.com/Expressing-z-t-test-data-in-a-graph-tp2131604p2131604.html
Sent from the R help mailing list archive at Nabble.com.