Displaying 20 results from an estimated 600 matches similar to: "sample consecutive integers efficiently"
2008 Aug 26
4
sequence with start and stop positions
Hi,
I have a vector of start positions, and another vector of stop positions,
eg start<-c(1,20,50)
stop<-c(7,25,53)
Is there a quick way to create a sequence from these vectors?
new<-c(1,2,3,4,5,6,7,20,21,22,23,24,25,50,51,52,53)
the way Im doing it at the moment is
pos<-seq(start[1],stop[1])
for (i in 2:length(start)){
new<-seq(start[i],stop[i])
pos<-c(pos,new)
}
2008 Dec 16
8
sliding window over a large vector
Hi all,
I have a very large binary vector, I wish to calculate the number of
1's over sliding windows.
this is my very slow function
slide<-function(seq,window){
n<-length(seq)-window
tot<-c()
tot[1]<-sum(seq[1:window])
for (i in 2:n) {
tot[i]<- tot[i-1]-seq[i-1]+seq[i]
}
return(tot)
}
this works well for for reasonably sized vectors. Does
2017 Jul 12
5
[LLD] Linker Relaxation
Hi,
On Wed, Jul 12, 2017 at 2:21 AM, Rui Ueyama via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> Thanks, Bruce. This is a very interesting optimization.
>
> lld doesn't currently have code to support that kind of code shrinking
> optimization, but we can definitely add it. It seems that essentially we
> need to iterate over all relocations while rewriting
2006 Mar 21
0
wine and Mankind (the one from www.mankind.net) - possible networking or file creation problem
Hello!
I am now trying for quiet a while to get Mankind running with wine.
I tried almost everything and read tons of wine's debug output - without
success (yet...).
The story in short: (also see
http://appdb.winehq.com/appview.php?appId=2409)
The game installs perfectly. It can be started. Its possible display
Mankind's news website within the client, but that doesn't have priority
2020 Apr 20
1
Re: [PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
On 4/19/20 4:14 PM, Richard W.M. Jones wrote:
> This extends the vector library with an insert function. It is more
> expensive than appending, but this does not affect existing code using
> vector and can be used in new places without making those uses more
> expensive.
>
> We use this function in nbdkit-extentlist-filter, nbdkit-eval-plugin
> and the sparse library.
>
2008 Dec 16
1
simulate binary markov chain
Hi all, I was hoping somebody may know of a function for simulating a
large binary sequence (length >10 million) using a (1st order) markov
model with known (2x2) transition matrix. It needs to be reasonably
fast. I have tried the following;
mc<-function(sq,P){
s<-c()
x<-row.names(P)
n<-length(sq)
p1<-sum(sq)/n
s[1] <- rbinom(1,1,p1);
for ( i in 2:n){
s[i]
2017 Jun 20
2
Dovecot >=2.2.29 + Filesystem quota = incorrect storage information
Hi,
I have problem with quota storage information in dovecot-2.2.29 (and
newer versions, too - 2.2.30.2).
I use FS quota backend.
............................
# 2.2.29.1 (e0b76e3): /etc/dovecot/dovecot.conf
# OS: Linux 4.4.68-1 x86_64
mail_plugins = quota
plugin {
quota = fs:User quota:mount=/poczta:user
quota2 = fs:Group quota:mount=/poczta:group
}
protocol imap {
2020 Sep 22
0
vkd3d release 1.2
The Wine team is proud to announce that release 1.2 of vkd3d, the Direct3D to
Vulkan translation library, is now available.
This release contains improvements that are listed in the release notes below.
The main highlights are:
- Availability of libvkd3d-shader as a public library.
- Support for tessellation shaders.
- Version 1.1 root signatures.
- Stream output support.
The source is
2017 Jun 21
2
Dovecot >=2.2.29 + Filesystem quota = incorrect storage information
W dniu 20.06.2017 o 21:25, Timo Sirainen pisze:
> On 20 Jun 2017, at 15.49, Macka <dovecot at macka.pl> wrote:
>> Hi,
>>
>> I have problem with quota storage information in dovecot-2.2.29 (and
>> newer versions, too - 2.2.30.2).
>> I use FS quota backend.
> .
>> After upgrade from 2.2.27 to 2.2.29 (newest 2.2.30.2 too), dovecot
>> returns
2013 Apr 07
3
mlogit error
Dear List
I am trying to fit a multinomial model using the mlogit package. Attempting to load
the data into mlogit presents the following error.
MLOG<-mlogit.data(Mult3,shape="long",choice="CHOICE",alt.var="mode.ids",indivs = "set3",chid.var = "obs")
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1.1", "1.2",
2005 Oct 06
3
playing with R: make a animated GIF file...
Hello all
I am playing with R for to make a animated GIF.
any suggestions, improvements are welcome :-)
case somebody could help me, i thanks!
Cleber N. Borges ( klebyn )
my objective:
(steps TODO)
-------------------
1) to save PNG files;
-----> i don't know the best way to make this;
2) transform the PNG files into GIF files (easy! no problem! ... i
think ...)
3)
2007 Apr 13
0
[951] branches/wxruby2/wxwidgets_282: Additions to Grid API 2.6->2.8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
---
plugins/vddk/vddk.c | 41 +++++++++++++++++++++++++----------------
TODO | 1 -
2 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index 87c0d146..d1a3015f 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -51,6 +51,7 @@
#include "isaligned.h"
#include "minmax.h"
#include
2002 Aug 29
2
problem with toString
Hi,
I am using R 1.5.1 under Windows 2000. I have a problem with the function toString: It seems not to work for longer
vectors as expressions.
This example works well:
q1<-expression(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
toString(q1)
I get:
"c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)" => OK
But this one does not:
2005 Oct 14
1
Diff between attr_accessible and attr_accessor
I''m going though the paper back edition of agile development with Rails. On
page #128 I encountered following lines of code:
attr_accessor :password
attr_accessible :name,:password
What''s the difference between attr_accessor and attr_accessible?
-=- Neeraj
_______________________________________________
Rails mailing list
2007 Aug 30
5
Single plot multiple levels in x?
Plotting with 2 x axis?
One axis inside another, for example salary within state,
1-50 | 50 ? 100 | 100+ | 1- 50 | 50 -100 | 100+ | ? repeated bins for salary
AL ! AR ?? more states
The values are all stored with a single data frame. I have tried different things with the axis function and done many
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help
I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ...
# Standard deviations and correlation
sig_x <- 1
sig_y <- 1
rho_xy <- 0.0
# Covariance between X and Y
sig_xy <- rho_xy * sig_x *sig_y
# Covariance matrix
Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2016 Jul 22
0
Wine release 1.9.15
The Wine development release 1.9.15 is now available.
What's new in this release (see below for details):
- More shader instructions in Direct3D.
- Performance improvements in GDI.
- Better multi-joystick support on macOS.
- Active Scripting improvements.
- Additional stream support in the C++ runtime.
- Various bug fixes.
The source is available from the following locations:
2016 Sep 09
3
how to allocate consecutive register?
Hi,
The gpu target I am working on requires the 'value' and 'address' operands
of memory store instruction in consecutive register. Anybody has suggestion?
- Ruiling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160909/e9d330bc/attachment.html>
2006 Mar 22
1
calculate difference of consecutive cells in vector
Hi
in dataframe I want to subtract the "next" value in the list from the former
one to get this:
name var1 output
a 9 506
b 515 512
c 1027 453
so I subtract: table$var1[2]-table$var1[1] and write it into table$output[1]
etc..
I did this with:
for (i in 1:(length(table$var1)){
table$output[i] <- table$var1[i+1]-table$var1[i] }
it works