similar to: What to do with a inconsistency in rank() that's in S+ and R ever since?

Displaying 20 results from an estimated 1000 matches similar to: "What to do with a inconsistency in rank() that's in S+ and R ever since?"

2007 Dec 15
1
modify a data.frame within a function
Hello all, I'm trying to modify a single column of a data frame to remove randomly half of the values. I want to do it within a function, but can not assign the modified column back into the data frame. It was easy and successful without a function, so I suspect the problem is the call of the single column within the function. removedata<-function(datafull,var.removed) { attach(datafull)
2006 Jan 11
3
natural sorting
It would be nifty to incorporate this into R or into an R package: http://sourcefrog.net/projects/natsort/
2009 Jun 12
1
Rprof loses all system() time
Rprof seems to ignore all time spent inside system() calls. E.g., this simple example actually takes about 10 seconds, but Rprof thinks the total time is only 0.12 seconds: > Rprof("sleep-system.out") ; system.time(system(command="sleep 10")) ; Rprof(NULL) user system elapsed 0.000 0.004 10.015 > summaryRprof("sleep-system.out")$by.total
2014 Apr 24
2
palette() can hang and fail due to X11
For many years, when my R process starts up I've been automatically setting my preferred default plot colors, basically like so: my.colors <- c("black" ,"red" ,"gold" ,"sky blue" ,"green" ,"blue" ,"orange" ,"grey" ,"hot pink" ,"brown" ,"sea green" ,"cyan"
2008 Sep 05
2
typo in cov()? var() fails on NA in R 2.7.2 but not R 2.6.1
I recently started using R 2.7.2, and noticed a surprising change in the behavior of var() on NA data: R 2.6.1 (Patched), 2007-11-26, svn.rev 43541, x86_64-unknown-linux-gnu: > stdev(rep(NA,3), na.rm=F) [1] NA > stdev(rep(NA,3), na.rm=T) [1] NA > var(rep(NA,3), na.rm=T, use="complete.obs") [1] NA R 2.7.2 (Patched), 2008-09-02, svn.rev 46491,
2013 Sep 30
1
how to interpose my own "[" function?
I want to create my own "[" function (for use on vectors, matrices, arrays, etc.), which calls the stock R "[", does some additional work, and then finally returns the modified result. But, how do I properly call the stock R "[" function? It takes a varying number of positional arguments, and its R-level closure is just: .Primitive("[") It's
2007 Oct 24
2
R trunk (2.7) build fails with -fpic, needs -fPIC (PR#10372)
On Linux x86-64 (Ubuntu 6.06), the latest R sources from the Subversion trunk fail to build with the following "recompile with -fPIC" error: $ ./configure --with-x=yes --prefix=$inst_dir --enable-R-shlib --with-tcltk=/usr/lib/tcl8.4 --with-tcl-config=/usr/lib/tcl8.4/tclConfig.sh $ make /usr/bin/ld: ../appl/approx.o: relocation R_X86_64_32 against `a local symbol' can not be
2014 Apr 21
1
read.table() code fails outside of the utils package
One of the great things about R is how readable and re-usable much of its own implementation is. If an R function doesn't do quite what you want but is close, it is usually very easy to read its code and start adapting that as the base for a modified version. In the 2.x versions of R, that was the case with read.table(). It was easy to experiment with its source code, as it all worked just
2010 Oct 27
2
must .Call C functions return SEXP?
For using R's .Call interface to C functions, all the examples I've seen have the C function return type SEXP. Why? What does R actually do with this return type? What happens if I *don't* return a SEXP? Reason I ask, is I've written some R code which allocates two long lists, and then calls a C function with .Call. My C code writes to those two pre-allocated lists, thus, I
2009 Aug 27
3
ARM v7/Linux Port/cross-compile?
Hi, Has anyone succeeded in cross-compiling R to Linux on an ARM CPU? If so, can you share a little about your toolchain & build process? Thanks! [[alternative HTML version deleted]]
2005 Oct 09
3
[ subscripting sometimes loses names (PR#8192)
--rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline R, like recent versions of S-Plus, sometimes - but not always - loses names when subscripting objects with "[". (Earlier versions of S and S-Plus had the correct, name-preserving behavior.) This seems bad, it would be better to remove names only by explicit request, not as an accidental
2009 Jul 27
1
how to change FPU control word?
Dear developers, is there (already) a platform-independent way for (temporarily!) changing the fpu control word? More precisely: I am looking for functions (accessible from C code in R packages) which read and write the fpu control word on x86 cpus (and cause no harm otherwise), because I need to (temporarily) turn off internal 80-bit precision for some algorithms relying on 64-bit IEEE
2005 Jan 28
1
R for CGI
Dear R Users; Perl is the common language to write CGI scripts which handle Forms. My question is that can R be as fast as perl to do the same job(with using CGIwithR package). Is it an optimal solution to connect R directly to a commercial HTML webpages, Sincerely, Sean
2007 Feb 05
1
How to customize the list of exported functions in a shared library
Dear R users, I am writing binding from C library to R. I use R 2.4.1, windows XP, and MinGW. commands set PKG_CPPFLAGS="-I../sources" "-I." set PKG_LIBS="-Lc:/mingw/lib" -lfl -liberty set DEBUG=T R CMD SHLIB -d --output=Rsnns.dll [ list of all C sources] produce the DLL having all defined functions in the export list. This doesn't satisfy me, as I would
2010 Jun 02
2
R and multi cpu ATLAS
Dirk suggested I move this thread over here. I am trying to get a multithreaded (multi CPU) version of ATLAS working with R, and have been unable, thus far, to get it working. Has anyone gotten an multithreaded version of ATLAS working on Debian (64 bit)? I've tried this: apt-get source atlas -t unstable cd atlas-3.8.3 DEFAULTS=n fakeroot debian/rules custom but it is APPEARING to only
2011 Sep 14
3
make check reg-tests-1b.R fails with Ubuntu R
Today I built R from source on a 32-bit Ubuntu 10.04.3 LTS box, and saw that the "make check" tests/reg-tests-1b.R failed. From the output at the end of my "tests/reg-tests-1b.Rout.fail" file, the problem is appearing in the "identical(z, x %*% t(y))" test code below. I then tried the stock R provided by the Ubuntu r-base-core binary package, and to my surprise, it
2007 Mar 14
1
allocVector reference
Hi, I'm trying to write a function to return an R vector which points directly to a contiguous subset of another vector, without taking a copy. Since SEXPREC is a header followed by the data, rather than the header plus a pointer to the data, I'm not sure what I'm trying to do is possible. Is there a way of doing this? Similar in spirit to how the R assignment "x=y" does
2005 Oct 03
2
access to R parse tree for Lisp-style macros?
R folks, I'm curious about possible support for Lisp-style macros in R. I'm aware of the "defmacro" support for S-Plus and R discussed here: http://www.biostat.wustl.edu/archives/html/s-news/2002-10/msg00064.html but that's really just a syntactic short-cut to the run-time use of substitute() and eval(), which you could manually put into a function yourself if you cared
2023 Oct 24
1
as.character.Date() strips names in R 4.3.2 beta, bug?
>>>>> Andrew Piskorski >>>>> on Tue, 24 Oct 2023 00:01:58 -0400 writes: > In previous versions of R, Not in R 4.3.0 or 4.3.1 {you are a bit late with updating ..}. > as.character.Date() retained any names on > its input vector. In R 4.3.2 beta, it removes names. Is this change > intentional, or a bug? (For what it's
2009 Sep 04
3
Load a package without installing it
Hi all, When developing a package, it's often useful to be able to reload it, without re-installing, re-starting R and re-loading. To do this I've written a little script that inspects the package description and loads dependencies, data and code - http://gist.github.com/180883. It's obviously not very general (being tailored to my description files) and won't work for packages