similar to: Funny result from rep(...) procedure

Displaying 20 results from an estimated 3000 matches similar to: "Funny result from rep(...) procedure"

2001 Jun 12
2
a problem with rep() ?
Colleagues ---------------------------------- System info: Version 1.2.3 (2001-04-26) on NT ESS v. 5.1.18 using emacs ver. 20.4 ---------------------------------- I am wondering if there is a problem with the function rep(). Both the commands using rep() below were expected to produce 8 twos, but only the second did. x <- rep(2,40*(1-0.8)) length(x) y <- rep(2,40*0.2) length(y)
2008 Feb 21
1
Permutation Test
Dear R users, i am fairly new to R and am having trouble creating code to solve a problem. I've searched the list, combed Crawley's 'R book' and several others, but can't quite find what i want. I want to generate permutations of various 'blocks' of 14 numbers. Each number within a block is a character state for a particular biological taxon. In the example below, for
2009 Jul 23
3
Counter
Hi everyone,   Is there any counter function in R for the following purpose: x <- matrix(c(1,1,0,2,1,0,0,2,0,1,2,1,2,1,0,1),nrow=4) As I would like to know how many zeros, ones, and twos in each row of x?   Many thank in advance, Amor     [[alternative HTML version deleted]]
2008 Aug 22
0
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
On Aug 22, 2008, at 9:34 AM, Chris Lattner wrote: > C has a way to express this: signed integers are defined to never > overflow, unsigned integers are defined to wrap gracefully on > overflow. And gcc has yet more fun in it: -fstrict-overflow Allow the compiler to assume strict signed overflow rules, depending on the language being compiled. For C
2018 Sep 17
1
Re: [PATCH nbdkit v2] common: Introduce round up, down; and divide round up functions.
On 9/17/18 3:38 PM, Richard W.M. Jones wrote: > These are used at various places in the code already. This > refactoring simply moves them to a common header file and should have > no other effect. > --- > common/include/rounding.h | 59 +++++++++++++++++++++++++++++++++++++ > filters/cache/Makefile.am | 3 +- > filters/cache/cache.c | 2 +- >
2009 Nov 16
3
Sum over indexed value
I am sure this is easy but I am not finding a function to do this. I have two columns in a matrix. The first column contains multiple entries of numbers from 1 to 100 (i.e. 10 ones, 8 twos etc.). The second column contains unique numbers. I want to sum the numbers in column two based on the indexed values in column one (e.g. sum of all values in column two associated with the value 1 in column
2010 Apr 07
2
Creating two lines of best fit on a scatter plot
Hello I am trying to plot two lines of best fit on a scatter plot. I'm plotting number of visits (y) against personality (x), half the plots are blue for patchchoice one and the other plots are red for patchchoice two (these options come from one factor, see below) . So i need a line for the patch ones and another line for the patch twos. How would i go about doing this? I know i
2017 Aug 24
2
How do set 'nest' addribute in an indirect call?
On 08/24/2017 09:40 AM, Tim Northover wrote: > On 17 August 2017 at 15:15, Rodney M. Bates via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> For an indirect call, i.e., on a function whose address is runtime variable, >> I can't find any place/way to attach this attribute. LLVMAddAttribute >> won't take a type. > > In the C++ API you'd add the
2015 Feb 05
7
[LLVMdev] i1 Values
I've been debugging some strange happenings over here and I put an assert in APInt to catch what I think is the source of the problem: int64_t getSExtValue() const { // An i1 -1 is unrepresentable. assert(BitWidth != 1 && "Signed i1 value is not representable!"); To me an i1 -1 makes no sense whatsoever. It is not representable in twos-complement form. It cannot
2012 Aug 05
1
trouble with looping for effect of sampling interval increase
I've looked everywhere and tinkered for three days now, so I figure asking might be good. So here's a general rundown of what I am trying to get my code to do I am giving you the whole rundown because I need a solution that retain certain ways of doing things because they give me the information i need. I want to examine the effect of increasing my sampling interval on my data. Example:
2011 Feb 14
2
Is there a way to force counters to be treated as "unsigned?"
I am acquiring some sampled data that is time-stamped (with a POSIXct). Some of the data is in the form of "counters" -- that is, what is interesting isn't value of a given counter at a given time, but the change in the counter from one sample to a later one. As the counters are only incremented, they would be perceived to be monotonically increasing -- ideally. Unfortunately, the
2010 Mar 27
3
Calling R from c in Windows XP
I'm searching for answers to four questions (I've been searching the net for hours...) In Windows XP, is it possible to call R functions from a c program? (I've found examples for Linux/Unix but not Windows) If so, is there a simple example to get started using gcc with R-2.10.0? If so, is it possible to write a simple interface using a c dll to call R functions from a Visual
2013 Nov 25
0
[LLVMdev] How do downcast signed integers?
Hello > I was looking at "trunc" to downcast a signed integer, say sint32 to sint16, > but it seems to handle unsigned integers only. No. In twos-complement notation (which LLVM assumes) there no difference between signed and unsigned truncation - you just throw out the spare sign bits and that's all. Please note that that the "numbers" in LLVM IR is neither signed
2016 Feb 27
0
[isocpp-parallel] Proposal for new memory_order_consume definition
On Feb 27, 2016 09:06, "Paul E. McKenney" <paulmck at linux.vnet.ibm.com> wrote: > > > But we do already have something very similar with signed integer > overflow. If the compiler can see a way to generate faster code that > does not handle the overflow case, then the semantics suddenly change > from twos-complement arithmetic to something very strange. The
2003 Feb 25
1
summary(polr.object)
Dear all, I have used polr in MASS but I am uncertain about the summary(polr.object) interpretation and would be happy for help on that. This is my summary: > summary(shade.polr) Re-fitting to get Hessian Call: polr(formula = as.ordered(shade) ~ as.factor(objekt), data = sof, weights = as.numeric(frek)) Coefficients: Value Std. Error t value 2.1699520 0.3681840 5.8936612
2016 Feb 27
2
[isocpp-parallel] Proposal for new memory_order_consume definition
On Sat, Feb 27, 2016 at 11:16:51AM -0800, Linus Torvalds wrote: > On Feb 27, 2016 09:06, "Paul E. McKenney" <paulmck at linux.vnet.ibm.com> > wrote: > > > > > > But we do already have something very similar with signed integer > > overflow. If the compiler can see a way to generate faster code that > > does not handle the overflow case, then the
2016 Feb 27
4
[isocpp-parallel] Proposal for new memory_order_consume definition
On Thu, Feb 25, 2016 at 04:46:50PM -0800, Hans Boehm wrote: > If carries_dependency affects semantics, then it should not be an attribute. I am not picky about the form of the marking. > The original design, or at least my understanding of it, was that it not > have semantics; it was only a suggestion to the compiler that it should > preserve dependencies instead of inserting a fence
2010 Feb 02
2
character variables in substitute()
In trying to create a plotmath expression for plot labeling, such as R = 6, beta = 15 where I want beta to be the Greek beta and, possibly, R in italics (like one would get in an explicit expression. The reason for this is that I want to write a string builder function that takes vectors of variable names and their values and return a plotmath expression for labeling a plot. One approach I
2016 Feb 29
0
[isocpp-parallel] Proposal for new memory_order_consume definition
Hi, On Sat, 27 Feb 2016, Paul E. McKenney wrote: > But we do already have something very similar with signed integer > overflow. If the compiler can see a way to generate faster code that > does not handle the overflow case, then the semantics suddenly change > from twos-complement arithmetic to something very strange. The standard > does not specify all the ways that the
2012 Nov 24
2
[LLVMdev] Uninitialized variable - question
On 24/11/2012, at 10:21 PM, Nick Lewycky wrote: > > Passing an uninitialized value as a function argument is undefined behaviour on the spot, regardless of what the callee does (even if it never references that argument). Cite reference? No? Then you're guessing ;) > > That aside, there is no way that 'i' has the same value, since it has no value. This is definitely