similar to: 1.6x speedup for requal() function (in R/src/main/unique.c)

Displaying 20 results from an estimated 500 matches similar to: "1.6x speedup for requal() function (in R/src/main/unique.c)"

2008 Aug 16
1
unique.default problem (PR#12551)
Full_Name: Vilmos Prokaj Version: R 2.7.1 OS: windows Submission from: (NULL) (213.181.195.84) Dear developers, The following line of code (produced by a mistake) caused an infinite loop unique("a",c("a","b")) or also unique(1,1:2) I made a little investigation, and it seems to be that the following function from unique.c is looping infinitely static int
2019 Sep 29
2
speed up R_IsNA, R_IsNaN for vector input
Dear R developers, I spotted that R_isNA and R_IsNaN could be improved when applied on a vector where we could take out small part of their logic, run it once, and then reuse inside the loop. I setup tiny plain-C experiment. Taking R_IsNA, R_IsNaN from R's arithmetic.c, and building R_vIsNA and R_vIsNaN accordingly. For double input of size 1e9 (having some NA and NaN) I observed following
2020 Jan 01
2
New R function is.nana = is.na & !is.nan
Hello R-devel, Best wishes in the new year. I am writing to kindly request new R function so NA_real_ can be more easily detected. Currently if one wants to test for NA_real_ (but not NaN) then extra work has to be done: `is.na(x) & !is.nan(x)` Required functionality is already at C level so to address my request there is not that much to do. Kevin Ushey made a nice summary of current R C api
2020 Jan 02
1
New R function is.nana = is.na & !is.nan
"nana" is meant to express "NA, really NA". Your suggestion sounds good. On Thu 2 Jan, 2020, 3:38 AM Pages, Herve, <hpages at fredhutch.org> wrote: > Happy New Year everybody! > > The name (is.nana) doesn't make much sense to me. Can you explain it? > > One alternative would be to add an extra argument (e.g. 'strict') to > is.na(). FALSE by
2004 Oct 22
1
Incompatibility between R-2.0.0 and Rggobi_1.0-0.
Hello, I was trying to install Rggobi in the latest version of R and it gave me a compilation error for R CMD INSTALL Rggobi_1.0-0.tar.gz RSGGobi.C: In function RS_GGOBI_init (R_IsNaNorNA) undeclared (line 77) I searched for this function in R src files and it was abandoned in ~/R-2.0.0/src/include/R_ext/Arith.h file. Only functions int R_IsNA(double); /* True for R's NA only */
2009 Jul 14
1
Incorrect comment about ISNA(x) in Arith.h (PR#13826)
R-2.9.0/include/R_ext/Arith.h has: int R_IsNA(double); /* True for R's NA only */ int R_IsNaN(double); /* True for special NaN, *not* for NA */ int R_finite(double); /* True if none of NA, NaN, +/-Inf */ #define ISNA(x) R_IsNA(x) /* True for *both* NA and NaN. The first and last lines are contradictory - if R_IsNA is true only for NA, not NaN, then ISNA should be the same.
2014 Feb 10
1
Question re: NA, NaNs in R
Hi R-devel, I have a question about the differentiation between NA and NaN values as implemented in R. In arithmetic.c, we have int R_IsNA(double x) { if (isnan(x)) { ieee_double y; y.value = x; return (y.word[lw] == 1954); } return 0; } ieee_double is just used for type punning so we can check the final bits and see if they're equal to 1954; if they are, x is NA, if they're
2019 Sep 30
0
speed up R_IsNA, R_IsNaN for vector input
On 9/29/19 1:09 PM, Jan Gorecki wrote: > Dear R developers, > > I spotted that R_isNA and R_IsNaN could be improved when applied on a > vector where we could take out small part of their logic, run it once, > and then reuse inside the loop. Dear Jan, Looking at your examples, I just see you have hand-inlined R_IsNA/R_IsNaN, or is there anything more? In principle we could put
2020 Jan 01
0
New R function is.nana = is.na & !is.nan
Happy New Year everybody! The name (is.nana) doesn't make much sense to me. Can you explain it? One alternative would be to add an extra argument (e.g. 'strict') to is.na(). FALSE by default, and ignored (with or w/o a warning) when the type of 'x' is not "numeric". H. On 12/31/19 22:16, Jan Gorecki wrote: > Hello R-devel, > > Best wishes in the new
2010 Jan 22
2
Optimizing C code
Hi the list, I need to write some efficient distances function, so I read the code for the Euclidean distance. I do not understand the purpose of the line 11 : if x[i] and y[i] are not NA (line 9), can dev be NA ? Christophe #define both_FINITE(a,b) (R_FINITE(a) && R_FINITE(b)) #define both_non_NA(a,b) (!ISNAN(a) && !ISNAN(b)) 1. static double R_euclidean2(double *x, double
2009 Oct 14
1
using mapply to avoid loops
Hello, I would like to use mapply to avoid using a loop but for some reason, I can't seem to get it to work. I've included copies of my code below. The first set of code uses a loop (and it works fine), and the second set of code attempts to use mapply but I get a "subscript out of bounds" error. Any guidance would be greatly appreciated. Xj, Yj, and Wj are also lists, and s2,
2011 Oct 06
1
sum of functions
Dear all, I would like to create a code for semiparametric Klein and Spady's estimator. For that I created a function that provides the log-likelihood function for each observation (so it is a function of betas and i, where i denotes the observation). Now, in order to maximize the log-likelihood function, I have to sum these log-likelihood functions for each i and so to get another function
2004 Aug 30
3
Multiple lapply get-around
I am faced with a situation wherein I have to use multiple lapply's. The pseudo-code could be approximated to something as below: For each X from i=1 to n For each Y based on j=1 to m For each F from 1 to f Do some calculation based on Fij Store Xi,Yj = Fij End For F End for Y End for X Is there anyway to optimize the processing logic further? I *guess* using the multiple lapply
2005 Jan 05
1
Standalone Mathlib, C++ and ISNAN()
In the hope of some meaningful response and ignoring the risk of further abuse, let me try to clarify the issue here. I have re-read the 'Writing R Extensions' manual. It seems to me that it clearly says R API functions can be called from from C++ programs, and the API includes the special values ISNAN() and R_FINITE() and the missing test ISNA(). R_FINITE is no problem. It is
2013 Jan 07
3
During startup - Warning messages:
Dear Sir/Madam, After installing R, I saw this warning message in red when I open the R... During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_COLLATE failed, using "C" 3: Setting LC_TIME failed, using "C" 4: Setting LC_MESSAGES failed, using "C" 5: Setting LC_PAPER failed, using "C" how shall I solve this ?
2011 Jul 11
1
plot means ?
Hi, I need this plot: given: x,y - numerical vectors of length N plot xi vs mean(yj such that |xj - xi|<epsilon) (running mean?) alternatively, discretize X as if for histogram plotting and plot mean y over the center of the histogram group. is there a simple way? thanks! -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://thereligionofpeace.com
2003 Dec 19
1
iterative proportional fitting
Dear all, I wonder if there are some function or package in R which can do the iterative proportional fitting. In the exponential model f(y1,...yn)=exp(a'yi+b'(yi*yj)+.....+c'(y1*...*yn)+constance), instead of the canonical parameters, I use maginal probability instead of a and log odds ratio instead of b. and for the order higher than 3, I use the canonical way or even assume
2009 Dec 04
1
Saving predict
Hi all,,Im using function arima() I.e series is my data model<-arima(series,c(1,0,0)) forecast<-predict(model,80) I want to create a variable: b1<-forecast$pred - 1.96*forecast$se and save in a txt file but using this: save(b1, file= "b1.txt") creates afile butwith this inside: ]{HQ ~|LJIiW*-l)% )m#), RIiSfdbGur9p94; H"L#Rez 1y3pN8{,I6W!6= {6l?OMw_5KZ+ =
2008 Aug 27
2
r function for calculating extreme spread in group
I'm trying to figure out how to write a r function that will calculate the extreme spread of a group of points given their (x,y) coordinates. Extreme Spread is the maximal Euclidean distance between two points in a group ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to j I have 60 levels to apply this to. There is the combination function in the dprep package but
2019 Apr 19
1
Extended logging / moved mails jumping back
did some improvements on the server. from dovecot -n # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 3.16.0-6-amd64 x86_64 Debian 8.11 to # 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.16 (fed8554) # OS: Linux 4.9.0-8-amd64 x86_64 Debian 9.8 dovecot is working for days without issues, logging is running to one file /var/log/mail.dovecot In the logfile appears