Displaying 20 results from an estimated 10000 matches similar to: "Lists and Binary Operators."
2005 Sep 19
3
Extended Hypergeometric Distribution
Dear R Users,
There exists a non-central hypergeometric distribution function in the (MCMCpack) package, and a hypergeometric distribution function in the (stats) package.
Is there a function for sampling from an extended hypergeometric distribution?
Thanks,
Narcyz
This message is intended for the addressee named and may con...{{dropped}}
2005 Jul 27
1
Problem specifying "function" for "mle" operation
Hello fellow R users,
Below are two cases using the "mle" operation from the stats4 package. In CASE 1 the code runs fine, in CASE 2 errors occur:
CASE 1
x, alpha_current, s, and n are vectors of the same length.
ll_beta<-function(b0=0,b1=0) -sum(s*b0+s*b1*x+s*alpha_current-n*log(1+exp(b0+b1*x+alpha_current)))
fit_beta<-mle(ll_beta)
CASE 2
The error message is as follows
2005 Jun 22
1
Newbie - Encoding PCM
Hi all,
i've to encode voice from a voicemodem. I choose speex 1.0.5 for its quality
in voice encoding. I've tried to implement an encoder but unsuccesfully.
Here's my code:
/* ============ SPEEX stream ENCODER
============================================ */
int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,unsigned char
*PCM,int num_samples) {
/* buffer point to the
2005 Jun 04
2
[PATCH] line endings fix
The replay gain code has dos line endings in CVS, which causes problems
for the Sun compiler, among others. Attached is a patch for the lazy,
but it's probably easier to fix locally and commit.
-r
2005 Jun 05
0
[PATCH] line endings fix
On Sat, Jun 04, 2005 at 08:00:45AM -0700, Ralph Giles wrote:
> The replay gain code has dos line endings in CVS, which causes problems
> for the Sun compiler, among others. Attached is a patch for the lazy,
> but it's probably easier to fix locally and commit.
Now with actual patch...
-r
-------------- next part --------------
Index:
2007 Nov 07
1
thumbnailer/swfdec-thumbnailer.c
thumbnailer/swfdec-thumbnailer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a31d0686b78df2da96b9d8d1e3220e63978bba30
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 7 20:02:04 2007 +0100
s/swfdec_player_get_image_size/swfdec_player_get_default_size/
diff --git a/thumbnailer/swfdec-thumbnailer.c b/thumbnailer/swfdec-thumbnailer.c
index
2016 Jul 05
3
ayuda frecuencia asistencia clase
Estimados usurios-R:
Tengo una lista de alumnos.
Hay alguna forma de sacar una tabla de frecuencias por la asistencia a
clases mensual.
Es decir cuantos días concurrió cada alumno en el mes.
Supongamos que la lista está conformada por ocho alumnos, el curso duró 4
días y quiero saber cuantos días concurrió cada uno al curso poniendolo en
la columna mes.
Quisiera obtener un cuadro así:
Alumnos
2009 Jan 31
2
[LLVMdev] -msse3 can degrade performance
I just remembered an anomalous result that I stumbled upon whilst tweaking the
command-line options to llvm-gcc. Specifically, the -msse3 flag does a great
job improving the performance of floating point intensive code on the
SciMark2 benchmark but it also degrades the performance of the int-intensive
Monte Carlo part of the test:
$ llvm-gcc -Wall -lm -O3 *.c -o scimark2
$ ./scimark2
Using
2005 Jun 30
0
speex_encode segfault
Hi,
i'm following encoder example in the manual.pdf of speex documentation. Here's
my portion of code:
int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,unsigned char
*PCM,int num_samples) {
int ret,c,d=0,nbBytes,ttBytes=0;
float PCM_F[160];
char cBits[200];
#ifndef DISABLESPEEX
speex_bits_reset(&IDA->speex_bits);
for(c=0;c<num_samples;c++) {
2005 Jul 03
0
speex_encode segfault
Hi,
i'm following encoder example in the manual.pdf of speex documentation. Here's
my portion of code:
int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,unsigned char
*PCM,int num_samples) {
int ret,c,d=0,nbBytes,ttBytes=0;
float PCM_F[160];
char cBits[200];
#ifndef DISABLESPEEX
speex_bits_reset(&IDA->speex_bits);
for(c=0;c<num_samples;c++) {
2009 Feb 23
1
are arithmetic comparison operators binary?
the man page for relational operators (see, e.g., ?'<') says:
"
Binary operators which allow the comparison of values in atomic vectors.
Arguments:
x, y: atomic vectors, symbols, calls, or other objects for which
methods have been written.
"
it is somewhat surprizing that the following works:
'<'(1)
# logical(0)
'<'()
#
2009 Feb 23
1
are arithmetic comparison operators binary?
the man page for relational operators (see, e.g., ?'<') says:
"
Binary operators which allow the comparison of values in atomic vectors.
Arguments:
x, y: atomic vectors, symbols, calls, or other objects for which
methods have been written.
"
it is somewhat surprizing that the following works:
'<'(1)
# logical(0)
'<'()
#
2005 Apr 27
4
Defining binary indexing operators
Assume we have a function like:
foo <- function(x, y)
how is it possible to define a binary indexing operator, denoted by $, so
that
x$y
functions the same as
foo(x, y)
2014 Aug 30
3
[Mesa-stable] [PATCH 2/2] nv50: zero out unbound samplers
On 30/08/14 23:02, Ilia Mirkin wrote:
> Samplers are only defined up to num_samplers, so set all samplers above
> nr to NULL so that we don't try to read them again later.
>
Would it be worth doing a similar thing with the unlocked samplers below the
nr mark ? It seems to me that we might be leaking nv50->samplers[s][i], or
perhaps I'm missing something ?
-Emil
>
2006 Jul 12
2
Are infix binary operators ** and ^ aliased?
Dear R-help,
After making a typo (reminiscent of FORTRAN 77, I guess) I found the
following:
> identical(all.equal(2^(-10:10), 2**(-10:10)), TRUE)
[1] TRUE
I have tried to find the documentation about the ** operator but I was
unsuccesful this way:
> sessionInfo()
Version 2.3.1 (2006-06-01)
powerpc-apple-darwin8.6.0
attached base packages:
[1] "methods" "stats"
2009 Mar 29
4
binary AND operators in R
I cannot find any R function or operator that performs a binary AND operation, as performed by Fortran built-in function "iand".
Ideally either R operator "&" or "&&" should do that. But some tests proved they do not:
> A<- 1
> B <- 2
> A
[1] 1
> B
[1] 2
> as.numeric(A&B)
[1] 1
> as.numeric(A&&B)
[1] 1
The binary
2009 Aug 09
1
binary operators that implement row and column sweeps of matrices by vectors
Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment.
Motivation:
As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector (and operator) to ‘sweep’ across a matrix.
Here is how these work. If M is I rows by J columns, then one entry corresponding to
2012 Jun 20
4
binary operators that never return missing values
Hi, I work with data sets with lots of missing values. We often need
to conduct logical tests on numeric vectors containing missing values.
I've searched around for material and conversations on this topic,
but I'm having a hard time finding anything. Has anyone written a
package that deals with this sort of thing? All I want are a group of
functions like the ones I've posted
2014 Aug 31
2
[Mesa-stable] [PATCH 2/2] nv50: zero out unbound samplers
On 31/08/14 00:34, Ilia Mirkin wrote:
> On Sat, Aug 30, 2014 at 7:30 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 30/08/14 23:02, Ilia Mirkin wrote:
>>> Samplers are only defined up to num_samplers, so set all samplers above
>>> nr to NULL so that we don't try to read them again later.
>>>
>> Would it be worth doing a similar thing
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
I'm using resample.c from speex in my project, and was testing it by
processing the same waveform twice, with a reset() call in the middle,
as follows:
short *input_data = read_waveform_as_linear(infileName, &rate,
&num_samples, &num_channels);
SpeexResamplerState *state = speex_resampler_init_frac(num_channels,
in_rate, out_rate, in_rate, out_rate, quality, &error);