similar to: Very strange function() behaviour.

Displaying 20 results from an estimated 3000 matches similar to: "Very strange function() behaviour."

2004 Jun 07
2
AGI + g729A
Hello.... I have the follow situatuion: < ISDN > | | V E100P |----------------| IAX2 / g729A |----------------| T100P | Asterisk1 |- - - - - - - - - - - - - - > | Asterisk2 | - - - - - -> |--------------| | | | | | Zhone | ----------------- ----------------- --------------- Here's the situation: I receive calls from the PSTN
2011 Dec 26
4
Other ways to lm() regression? (non-loop?)
Hi, I'm quite new to R (1 month full time use so far). I have to run loop regressions VERY often in my work, so I would appreciate some new methodology that I'm not considering. #--------------------------------------------------------------------------------------------- y<-matrix(rnorm(100),ncol=10,nrow=10) x<-matrix(rnorm(50),ncol=5,nrow=10) #Suppose I want to run the
2001 Nov 27
3
Equations as arguments to functions
I am trying to pass an equation as an arguement to a function, which seems pretty straightforward given lazy evaluation. I constructed the following little test to make sure I sort of knew what I was doing: go <- function(X,eq) { C <<- X*2; d <<- eq} a _ rnorm(100) go(10,eq=a[.5*length(a)]+C+1) > C [1] 20 > d [1] 21.10551 > a[.5*length(a)] [1] 0.1055086 Everything
2011 Apr 19
0
doSMP package works better than perfect, at least sometimes.
Some might have noticed that REvolution Computing released the doSMP package to the general public about a month and a half ago, which allows multiple cores to be accessed for parallel computation in R. Some of our physical habitat calculations were taking an extraordinary amount of time to complete and required over-weekend runs, which prompted our interest in this package. What follows
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
This patch allows virtio-net driver to report traffic distribution to inbound/outbound queues through ethtool -S. The per_cpu virtnet_stats is split into receive and transmit stats and are maintained on a per receive_queue and send_queue basis. virtnet_stats() is modified to aggregate interface level statistics from per-queue statistics. Sample output below: NIC statistics: rxq0:
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
This patch allows virtio-net driver to report traffic distribution to inbound/outbound queues through ethtool -S. The per_cpu virtnet_stats is split into receive and transmit stats and are maintained on a per receive_queue and send_queue basis. virtnet_stats() is modified to aggregate interface level statistics from per-queue statistics. Sample output below: NIC statistics: rxq0:
2005 Mar 03
2
reading row vectors from file
Hi, New to R, using version 2.0.1 (2004-11-15) on debian Linux (sid), kernel 2.6.8-2-686. I have data in files with separate vectors on each row of the file, e.g., $ cat /tmp/stats freq,0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,... noise,49,47,48,48,50,47,48,47,46,50,48,54,49,47,49,... signal,99,0,100,0,0,100,0,100,100,0,100,101,100,0,0,... pctrcv,5,0,5,0,0,5,0,5,11,0,5,5,5,0,0,...
2010 May 24
2
adding one line to a plot
Hello! I am running a very simple mini Monte-Carlo below using the function tstatistic (right below this sentence): tstatistic = function(x,y){ m=length(x) n=length(y) sp=sqrt( ((m-1)*sd(x)^2 + (n-1)*sd(y)^2)/(m+n-2) ) t=(mean(x)-mean(y))/(sp*sqrt(1/m+1/n)) return(t) } alpha=.1; m=10; n=10 # sets alpha, m, n - for run 1 N=10000 # sets the number of simulations n.reject=0 # counter of num.
1998 Feb 19
1
R-beta: t.test
As a very new user of R, and a user of S with very limited experience, I thought I would start humbly with a simple t.test. The response to the command sequence sample <- scan() 4 5 6 7 8 9 t.test(sample,mu=20) rather surprised me, because of the idiosyncratic choice of a confidence interval for the mean of the population from which the sample was drawn. I asked my colleague Bob Henery
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people. I was a bit intrigued by the message quoted below. Indeed, if pt() is given a matrix, it returns a matrix. Should this feature be documented? ?pt speaks about "a vector of quantiles", and says nothing about the type of what it returns. The same might presumably apply to other distribution-related functions. ----- Forwarded message from Martyn Plummer <plummer at
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and sigma from N iid draws of N(mu, sigma^2): tStat <- abs(x - muhat) / sigmahat pValue <- pt(tStat, df=N, lower=TRUE) I'm not quite sure what df tStat should have (exercise for math stat), but given fairly large N, that should make little difference. Andy > From: Ross Clement > > Hi. I have a
1999 Oct 05
2
for loops and counters
I am trying to assign values to a vector (pvalue). Similar code works in C but not in R. What am I doing wrong? r <- pvalue <- 0 for(i in (1:(k-1))){ for(j in (i+1):k){ r <- r+1 tstat <- (means[i]-means[j])/rms pvalue[r] <- 2*(1-pt(abs(tstat),df)) } } Thank you. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del
1998 Feb 22
0
R-beta: t.test in R
RE t.test in R I objected a day or two ago to the behaviour of the one-sample t.test in R where it is easy to generate a "confidence interval" for the mean of the population which does not contain the sample mean, in the case where the null hypothesis is rejected. It now appears that the same behaviour is latent in the code for the two-sample version of this test. The relevant lines
2011 Jun 20
1
requesting a mentor for R development
I'd like to learn the process of revising R functions & packages and then submitting proposed patches to the R Core team. Would someone be willing to mentor me through one example? For starters, consider an example. I'd like to revise the t.test function to return the stderr value to the user. We only need to change the "rval" in the third-from-the end line of
2012 Mar 31
2
lm no calcula un coeficiente
Hola, quiero hacer una regresión lineal lm(y ~ x * grupo, data =datos) y: numérica, x: numérica, grupo: factor con dos niveles (1 y 2) pero no calcula el coeficiente de x:grupo2 a cuenta de una singularidad Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) -1.283e+06 2.276e+04 -56.359 < 2e-16 *** x
2006 Aug 09
0
Weighted Mean Confidence Interval
Hello, I'm looking to calculate a 95% confidence interval about my estimate for a sample's weighted mean, where the calculated confidence interval would equal the t-test confidence interval of the sample in the case when all of the weights are equal. My initial thought was to simply implement a modified version of the t-test function but substituting the weighted variance and mean for the
2009 Mar 29
2
Compiler options for Makefile.win
Dear all, For certain reasons I have to compile the source code of my package on Windows XP using Microsoft Visual Studio 9.0, thus I had to create a "Makefile.win". Now I have a question regarding compiler options /MT vs /MD for Makefile.win. The following partial output shows that when building my package on Windows XP using "R CMD build --binary xps" with compiler
2023 Oct 16
1
Create new data frame with conditional sums
If one makes the reasonable assumption that Pct is much larger than Cutoff, sorting Cutoff is the expensive part e.g O(nlog2(n) for Quicksort (n = length Cutoff). I believe looping is O(n^2). Jeff's approach using findInterval may be faster. Of course implementation details matter. -- Bert On Mon, Oct 16, 2023 at 4:41?AM Leonard Mada <leo.mada at syonic.eu> wrote: > > Dear
2023 Oct 14
1
Create new data frame with conditional sums
That's very helpful and instructive, thank you! Jason Stout, MD, MHS Box 102359-DUMC Durham, NC 27710 FAX 919-681-7494 ________________________________ From: John Fox <jfox at mcmaster.ca> Sent: Saturday, October 14, 2023 10:13 AM To: Jason Stout, M.D. <jason.stout at duke.edu> Cc: r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] Create new data frame with
2009 Jul 23
1
ROCR - confidence interval for Sens and Spec
Dear List,   I am new to ROC analysis and the package ROCR. I want to compute the confidence intervals of sensitivity and specificity for a given cutoff value. I have used the following to calculate sensitivity and specificity:   data(ROCR.simple) pred <- prediction(ROCR.simple$predictions, ROCR.simple$labels)   se.sp <- function (cutoff, performance) {     sens <-