similar to: A rep_each function

Displaying 20 results from an estimated 1000 matches similar to: "A rep_each function"

2014 Mar 26
2
R-devel Digest, Vol 133, Issue 23
> From: Richard Cotton <richierocks at gmail.com> > > The rep function is very versatile, but that versatility comes at a > cost: it takes a bit of effort to learn (and remember) its syntax. > This is a problem, since rep is one of the first functions many > beginners will come across. Of the three main uses of rep, two have > simpler alternatives. > > rep(x,
2020 Sep 08
2
Operations with long altrep vectors cause segfaults on Windows
I can only reproduce on Windows, but reliably (both 4.0.0 and 4.0.2): $> R --vanilla x <- c(0L, -2e9:2e9) # > Segmentation fault Tried to reproduce on Linux but the above worked as expected. Not an issue merely with the length of the vector; for example, x <- rep_len(1:10, 1e10) works, though the altrep vector must be long to reproduce: x <- c(0L, -1e9:1e9) #ok Segmentation
2019 Feb 20
2
Bug: time complexity of substring is quadratic as string size and number of substrings increases
Hi all, (and especially hi to Tomas Kalibera who accepted my patch sent yesterday) I believe that I have found another bug, this time in the substring function. The use case that I am concerned with is when there is a single (character scalar) text/subject, and many substrings to extract. For example substring("AAAA", 1:4, 1:4) or more generally, N=1000
2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
On 23/02/2023 4:36 a.m., Sigbert Klinke wrote: > Hi, > > I would have expected that I get always 3 colors as result which is not > true: > > hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors > > rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors > > heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors > > terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors > >
2014 Aug 01
1
Connecting Asterisk and BT Versatility PBX via NT BRI port
Hi All, I've a BT Versatility PBX that I want to connect to my asterisk 11.9.0 box via BRI port in NT mode but actually I wasn't able to get it working. I've another standalone PBX, it's a Panasonic model, which works fine connected to the same port. The BT connected to a UK BT BRI line works quite fine after roughly a minute once connected. The PBX can be seen at
2019 Feb 22
1
Bug: time complexity of substring is quadratic as string size and number of substrings increases
On 2/20/19 7:55 PM, Toby Hocking wrote: > Update: I have observed that stringi::stri_sub is linear time complexity, > and it computes the same thing as base::substring. figure > https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png > source: > https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.R > > To me this is a
2020 Sep 08
4
Operations with long altrep vectors cause segfaults on Windows
>>>>> Martin Maechler >>>>> on Tue, 8 Sep 2020 10:40:24 +0200 writes: >>>>> Hugh Parsonage >>>>> on Tue, 8 Sep 2020 18:08:11 +1000 writes: >> I can only reproduce on Windows, but reliably (both 4.0.0 and 4.0.2): >> $> R --vanilla >> x <- c(0L, -2e9:2e9) >> # > Segmentation
2008 Oct 06
2
Maildir++ problem
Hi to all, I am semi-new to the dovecot system, but i like it very much for the versatility of all the system. I have a problem: i am migrating my servers from postfix with vda patch + courier imap to dovecot. All works fine, except for one thing: i use Maildir++ format, but i don't know how to make the file maildirsize into the home of the users. This file is needed by me becouse i have a
2013 Dec 13
1
substring() and propagation of names
Hi, In R < 3.0.0, we used to get: > substring(c(A="abcdefghij", B="123456789"), 2, 6:2) A B A B A "bcdef" "2345" "bcd" "23" "b" But in R >= 3.0.0, we get: > substring(c(A="abcdefghij", B="123456789"), 2, 6:2) [1] "bcdef"
2016 Nov 29
0
ifelse() woes ... can we agree on a ifelse2() ?
Interspersed below. -------------------------------------------- Subject: Re: ifelse() woes ... can we agree on a ifelse2() ? To: R-devel at lists.R-project.org Date: Sunday, 27 November, 2016, 12:14 AM On current 'ifelse' code in R: ... * If 'test' is a factor, doing storage.mode(test) <- "logical" is not appropriate, but is.atomic(test) returns TRUE. Maybe use
2020 Jan 19
2
rpois(9, 1e10)
Hello, All: ????? Consider: Browse[2]> set.seed(1) Browse[2]> rpois(9, 1e10) NAs produced[1] NA NA NA NA NA NA NA NA NA ????? Should this happen? ????? I think that for, say, lambda>1e6, rpois should return rnorm(., lambda, sqrt(lambda)). ????? For my particular Monte Carlo, I have replaced my call to rpois with a call to the following: ?rpois. <- function(n,
2020 May 08
0
base::order making available retGrp and sortStr options for radix method?
Hi together, a bit more than a month ago I have released the 'collapse' package for advanced and fast data transformation in R with an array of fast grouped and weighted functions and facilities for efficient grouped programming in R. As I am preparing the next update of this package I have come across the following: For grouping, 'collapse' uses the function 'GRP', and
2018 May 03
1
Proposed speedup of ifelse
I propose a patch to ifelse that leverages anyNA(test) to achieve an improvement in performance. For a test vector of length 10, the change nearly halves the time taken and for a test of length 1 million, there is a tenfold increase in speed. Even for small vectors, the distributions of timings between the old and the proposed ifelse do not intersect. The patch does not intend to change the
2013 Sep 18
1
Design for classes with database connection
Dear R-Devels, I am designing right now a package intended to simplify the handling of market microstructure data (tick data, order data, etc). As these data is most times pretty huge and needs to be reordered quite often (e.g. if several security data is batched together or if only a certain time range should be considered) - the package needs to handle this. Before I start, I would like to
2014 Dec 04
1
\U with more than 4 digits returns the wrong character
Great spot, thanks Mark. This really ought to appear somewhere in the ?Quotes help page. Having a warning under Windows might be nicer behaviour than silently returning the wrong value too. On 4 December 2014 at 22:24, Mark van der Loo <mark.vanderloo at gmail.com> wrote: > Richie, > > The R language definition [1] says (10.3.1): > > \Unnnnnnnn \U{nnnnnnnn} > (where
2020 Sep 08
2
[External] Re: Operations with long altrep vectors cause segfaults on Windows
On Tue, 8 Sep 2020, Hugh Parsonage wrote: > Thanks Martin. On further testing, it seems that the segmentation > fault can only occur when the amount of obtainable memory is > sufficiently high. On my machine (admittedly with other processes > running): > > $ R --vanilla --max-mem-size=30G -e "x <- c(0L, -2e9:2e9)" > Segmentation fault > > $ R --vanilla
2010 Jun 08
3
[LLVMdev] Congratulations: First-Time SIGPLAN Award to Apple's Chris Lattner for Developing Popular LLVM Infrastructure with Applications in Commercial, Research, Teaching, and Open Source Projects
First-Time SIGPLAN Award to Apple's Chris Lattner for Developing Popular LLVM Infrastructure with Applications in Commercial, Research, Teaching, and Open Source Projects From the press release: June 7, 2010 – The ACM Special Interest Group on Programming Languages (SIGPLAN) today presents its first-ever Programming Languages Software Award to Chris Lattner of Apple Inc. for his design
2020 Sep 08
1
[External] Re: Operations with long altrep vectors cause segfaults on Windows
>>>>> luke-tierney >>>>> on Tue, 8 Sep 2020 09:42:43 -0500 (CDT) writes: > On Tue, 8 Sep 2020, Martin Maechler wrote: >>>>>>> Martin Maechler >>>>>>> on Tue, 8 Sep 2020 10:40:24 +0200 writes: >> >>>>>>> Hugh Parsonage >>>>>>> on Tue, 8 Sep 2020
2015 May 25
2
Unicode display problem with data frames under Windows
Here's a data frame with some Unicode symbols (set intersection and union). d <- data.frame(x = "A \u222a B \u2229 C") Printing this data frame under R 3.2.0 patched (r68378) and Windows 7, I see d ## x ## 1 A <U+222A> B n C Printing the column itself works fine. d$x ## [1] A ? B ? C ## Levels: A ? B ? C The encoding is correctly UTF-8.
2023 Feb 23
2
Palettes {grDevices} - wrong number of colors returned?
Hi, I would have expected that I get always 3 colors as result which is not true: hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors cm.colors(3, alpha=c(0, 0.5, 1)) # 6 colors topo.colors(3, alpha=c(0, 0.5, 1)) # 9 colors R-Version and