Re: [Rd] as.character.Date() strips names in R 4.3.2 beta, bug?

2023-10-24 Thread Andrew Piskorski
planation and pointers to the old info I'd missed, Martin. The as.character.Date tip in particular was very helpful in adapting my code to work with this change. -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mail

[Rd] as.character.Date() strips names in R 4.3.2 beta, bug?

2023-10-23 Thread Andrew Piskorski
lease DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS" $ R --vanilla R version 4.3.2 beta (2023-10-22 r85392) -- "Eye Holes" > v2 <- structure(as.Date(c('2021-10-06','2021-10-08')) ,names=c('a','b')) > v2 ab "20

Re: [Rd] R 4.1.x make check fails, stats-Ex.R, step factor reduced below minFactor

2021-10-01 Thread Andrew Piskorski
00.0300625 9.9144191 0.5023516843) 0.9906046057 (1.84e-05): par = (100.0288724 9.916224018 0.5025207336) 0.9906046054 (9.95e-08): par = (100.028875 9.916228366 0.50252165) 0.9906046054 (9.93e-08): par = (100.028875 9.916228366 0.50252165) Error in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 In addition: Warning message: In nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", : No starting values specified for some parameters. Initializing 'Const', 'A', 'B' to '1.'. Consider specifying 'start' or using a selfStart model -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] R 4.1.x make check fails, stats-Ex.R, step factor reduced below minFactor

2021-10-01 Thread Andrew Piskorski
6 0.50252165) 0.9906046054 (9.93e-08): par = (100.028875 9.916228366 0.50252165) Error in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 Calls: update -> update.default -> eval -> eval -> nls Execution halted ## After install, start R with --vanilla and run tests like this: ## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Testing-a-Unix_002dalike-Installation Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en") pdf("tests.pdf") tools::testInstalledPackages(scope="base", errorsAreFatal=FALSE) -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Rprofile.site function or variable definitions break with R 4.1

2021-08-12 Thread Andrew Piskorski
ve from these). Ok, but what's the recommended way to actually USE Rprofile.site now? Should I move all my local configuration into a special package, and do nothing in Rprofile.site except require() that package? Thanks for your help and advice! -- Andrew Piskorski

[Rd] failed to assign RegisteredNativeSymbol for splitString

2016-07-18 Thread Andrew Piskorski
puts quotes around the splitString or not - I tried it, and it made no difference. Is it generally the case the users MUST NOT define R functions with the same names as "registered" C functions? Will something break if we do? -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Custom C finalizers for .Call

2015-11-24 Thread Andrew Piskorski
() terminates execution. But this is a ridiculously roundabout way to infer what the behavior of Rf_error() is supposed to be... -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Please make Pre-3.1 read.csv (type.convert) behavior available

2014-04-27 Thread Andrew Piskorski
ly ignore NAs already present in the incoming data. old.warn <- options(warn = -1) ; on.exit(options(old.warn)) aa <- !is.na(as.numeric(xx)) if(ignore.na.p) (is.na(xx) | aa) else aa } -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] palette() can hang and fail due to X11

2014-04-25 Thread Andrew Piskorski
endent jobs into the single palette() command seems a bit unfortunate. Is there was some way for me to do ONLY the first of palette()'s jobs, set my session-wide default colors and that's it? It looks like there is no such entry point in the code, but the little hac

Re: [Rd] palette() can hang and fail due to X11

2014-04-24 Thread Andrew Piskorski
of R I've ever used. I am using: R 3.1.0 (Patched), 2014-04-15, svn.rev 65398, x86_64-unknown-linux-gnu Ubuntu 12.04.3 LTS Is there something else I should check to help track down the bug? -- Andrew Piskorski __ R-devel@r-project.org ma

[Rd] palette() can hang and fail due to X11

2014-04-24 Thread Andrew Piskorski
ars to be "palette" in "src/library/grDevices/src/colors.c" and "do_dotcallgr" for .Call.graphics in "src/main/dotcode.c", but I don't understand what part is triggering the additional complex behavior, nor how I should avoid it. Any advice on how I should handle this robustly? (Thanks!) -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
On Mon, Apr 21, 2014 at 06:44:05PM +0100, Prof Brian Ripley wrote: > On 21/04/2014 18:08, Andrew Piskorski wrote: > >> .External(utils:::C_readtablehead, ...) > > > > Ah, that works fine, and is nice and simple. So problem solved, thank > > you! > > >

[Rd] how to get old type.convert() numeric behavior?

2014-04-21 Thread Andrew Piskorski
(rep(0:9,3)[seq_len(17)],collapse=""), sep=""), > as.is=TRUE) [1] 0.01234568 > type.convert(paste("0.", paste(rep(0:9,3)[seq_len(18)],collapse=""), sep=""), > as.is=TRUE) [1] 0.01234568 -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
problem solved, thank you! I do still wonder though, with the C symbol made visible in utils.so, how come this still failed?: .External("readtablehead", ..., PACKAGE="utils") Error: "readtablehead" not available for .E

[Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Andrew Piskorski
interface or behavior of readtablehead necessarily be SUPPORTED in any way, just that it be callable for experimental purposes, much as the old .Internal(readTableHead()) was in earlier versions of R. -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Why did R 3.0's resolveNativeRoutine remove full-search ability?

2014-04-18 Thread Andrew Piskorski
; behavior as not passing any PACKAGE argument at all. So apparently the removal of functionality was intentional. I'd like to better understand why. Why should that be an error? Or said another way, why has traditional Unix-style symbol resolution been banned from use with .C and .Call ? --

[Rd] how to interpose my own "[" function?

2013-09-29 Thread Andrew Piskorski
ot;") if (!missing(j))code <- paste(code ,'j' ,sep="") if (!missing(...)) code <- paste(code ,',...' ,sep="") if (!missing(drop)) code <- paste(code ,',drop=drop' ,sep="") code <- paste(code ,')' ,sep="") result <- eval(parse(text=code)) # FINALLY we have the stock result, now modify it some more... result } -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] why does do_stop call R_GetTraceback ?

2012-11-21 Thread Andrew Piskorski
(call=, format=) at ../../../src/main/errors.c:698 #16 0x7ff2880a25c2 in do_stop (call=, op=, args=0x10ecae78, rho=) at ../../../src/main/errors.c:1095 [...] #79 0x00400819 in _start () -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Quiz: How to get a "named column" from a data frame

2012-08-19 Thread Andrew Piskorski
perience suggests that most R code which expects un-named objects doesn't mind at all if names are present. If anyone would genuinely like to add an option for name-preserving subscripting to R, I'm willing to work on it, so please do let me know your thoughts. So far though, I've never dug into the guts of the .Primitive("[") and "[.data.frame" functions to see how/why they sometimes keep and sometime discard names during subscripting. -- Andrew Piskorski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] BLAS benchmarks on R 2.12.0

2010-11-01 Thread Andrew Piskorski
at all, rather than one of the faster optimized BLAS libraries (Atlas, Goto, AMD, Intel, etc.)? -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Andrew Piskorski
a thorough and illuminating answer. (Now I have better understanding of how the machine works, and what the dangerous sharp bits are. :) -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Andrew Piskorski
y Ugly? From my reasons above, I think it will always work correctly and thus is not Broken. But of course given R's devotion to pass-by-value, it could be considered unacceptably Ugly. -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] must .Call C functions return SEXP?

2010-10-27 Thread Andrew Piskorski
other.input) My C code looks like this: SEXP result_v; result_v = Rf_allocVector(REALSXP, 5); SET_VECTOR_ELT(result_list_1, k1, result_v); REAL(result_v)[0] = some_number; REAL(result_v)[1] = another_number; /* Also do the same sort of thing for result_list_2. */ return(resul

Re: [Rd] Adding Tcl source to an R package

2010-08-11 Thread Andrew Piskorski
e using variable names you know at the time you write the code rather than the run-time determined variable names that tclVar() gives you. However, the implementation of tclVar() is nicely simple, and if you look you'll see how to make your own version that uses whatever Tcl variable name you

[Rd] R's --enable-threads does nothing?; gdb needs -lpthread

2009-10-05 Thread Andrew Piskorski
what to do when my *.so suddenly brings in the thread stuff. Since I can't stop using -lpthread in my library, the obvious fix is for me to build R itself with -lpthread, so gdb doesn't get confused. -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Running two R instances at the same time

2009-09-07 Thread Andrew Piskorski
't any of your international collaborators run across this serialization problem before?) -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Running two R instances at the same time

2009-09-07 Thread Andrew Piskorski
n your Perl code. Have you tried using your Perl framework to fork something OTHER than R? Have you tried manually starting up two R processes and running your R code that way? And, what is the actual R code you're running? You don't seem to have shown i

Re: [Rd] Load a package without installing it

2009-09-05 Thread Andrew Piskorski
x27;d generally rather have R access my package's stuff via the search path in the usual manner, not from some other special location that Production never uses. -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] ARM v7/Linux Port/cross-compile?

2009-08-28 Thread Andrew Piskorski
It sounds like you know a better way... -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] how to change FPU control word?

2009-07-28 Thread Andrew Piskorski
nt? I don't know about that. But on Linux, mostly x86-64, we use these from C: _FPU_GETCW() _FPU_SETCW() -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Rprof loses all system() time

2009-06-12 Thread Andrew Piskorski
SQL queries. Why does Rprof behave this way? Is there something I can do to work-around or alleviate this? What do you think it would take to fix Rprof to track the time spent waiting for system() to finish, and where in the R source should I look to att

Re: [Rd] Closed-source non-free ParallelR ?

2009-04-24 Thread Andrew Piskorski
second (or third?) implementation and dialect of the S language, originally created at Bell Labs. So gee, maybe R is "derived" from Bell Labs S, and R's own GPL license is invalid? Of course not, the entire idea is absurd (shades of SCO) - as I hope you agree. -- Andrew Piskorski http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] (PR#8192) [ subscripting sometimes loses names

2009-01-31 Thread Andrew Piskorski
ately S-Plus 6.0 back in 2001 show similar buggy edge case behavior. Older versions of S-Plus, c. S-Plus 3.3 and earlier, had the correct, name preserving behavior. I presume that the original Bell Labs S had correct name-preserving behavior, and then the S-Plus develop

[Rd] typo in cov()? var() fails on NA in R 2.7.2 but not R 2.6.1

2008-09-05 Thread Andrew Piskorski
3L cor.R 36:else if (na.method != 3L) { 118:else if (na.method != 3L) { That line might not be the cause of my "no complete element pairs" problem (I'm not at all sure), but it does look suspicious. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskors

Re: [Rd] Erlang-style message-passing in R: Rmpi, Snow, NetWorkSpaces, etc.

2008-09-04 Thread Andrew Piskorski
could start up your several R processes on a single fat SMP node, and use an MPI that sends messages through fast shared memory. That's probably still slower than thread-to-thread communications, but it should be much lower latency than TCP/IP. Maybe you already tried something like tha

[Rd] Erlang-style message-passing in R: Rmpi, Snow, NetWorkSpaces, etc.

2008-09-04 Thread Andrew Piskorski
.org/wiki/Oz_(programming_language)#Dataflow_variables_and_declarative_concurrency 22. http://www.info.ucl.ac.be/~pvr/cvvanroy.html 23. http://www.amazon.com/gp/product/0262220695/ 24. http://www.mozart-oz.org/ -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/

[Rd] R-uthreads?

2008-04-03 Thread Andrew Piskorski
nd I can't tell much just from looking at "src/main/uthreads.c". -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problem with dyn.load'ed code

2007-12-31 Thread Andrew Piskorski
t something like to this: PKG_LIBS = -Wl,--version-script=vis.map -Wl,-Bstatic -L/usr/local/lib/ARPACK -lARPACK -Wl,-Bdynamic You may also need a PG_PKG_LIBS with the same stuff, but I don't remember why. The '--version-script=' and related matters were also disccussed her

Re: [Rd] R trunk (2.7) build fails with -fpic, needs -fPIC (PR#10372)

2007-10-25 Thread Andrew Piskorski
', removed my changes to configure, and... It worked! It now builds successfully with -fpic (not -fPIC). So, problem solved, thank you! And I apologize for wasting your time with this. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ _

Re: [Rd] R trunk (2.7) build fails with -fpic, needs -fPIC (PR#10372)

2007-10-24 Thread Andrew Piskorski
ls gcc-4.0 +++-==-=-== ii binutils 2.16.1cvs20060117-1ubuntu2.1 The GNU assembler, linker and binary utilities ii gcc-4.04.0.3-1ubuntu5The GNU C compiler -- Andrew Piskorski <[EMAIL PROTECT

Re: [Rd] allocVector reference

2007-03-15 Thread Andrew Piskorski
Notes on References, External Objects, or Mutable State for R: http://www.stat.uiowa.edu/~luke/R/references.html Simple References with Finalization: http://www.stat.uiowa.edu/~luke/R/simpleref.html Finalization and Weak References in R: http://www.stat.uiowa.edu/~luke/R/ref

Re: [Rd] How to customize the list of exported functions in a shared library

2007-02-05 Thread Andrew Piskorski
t;--version-script" linker option doing the magic. Even with Gnu ld, there are definitely other ways to control symbol visibility, but that one seemed most convenient in my case. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ __

Re: [Rd] use one custom package with multiple R versions?

2006-11-30 Thread Andrew Piskorski
in the regular prefix and thus handling things like external > libraries is much less painful. Just make sure you create proper Simon, I don't understand the distinction, could you explain what these two methods do differently, please? And how does this affect the use of external

[Rd] use one custom package with multiple R versions?

2006-11-30 Thread Andrew Piskorski
tiple source working copies? (I see that R CMD INSTALL has a "--with-package-versions" option, but I think that's about using multiple versions of a package with one version of R, while I want the vice versa.) Thanks! -- Andrew Piskorski <[EMAI

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

2006-10-27 Thread Andrew Piskorski
,3,4,NA)) > rank(c(1,NA,3,4,NA)) [1] 1.0 4.5 2.0 3.0 4.5[1] 1 4 2 3 5 > rank(c(1,NA,3)) > rank(c(1,NA,3)) [1] 1 3 2 [1] 1 3 2 > rank(c(NA,NA,3)) > rank(c(NA,NA,3)) [1] 2.5 2.5 1.0[1] 2 3 1 -- Andrew Piskorski

Re: [Rd] [R] multithreading calling from the rpy Python package

2006-10-21 Thread Andrew Piskorski
cl's threading) are the better way to go, rather than "shared everything by default" (like POSIX threads). The Erlang and Mozart/Oz folks both seem to think so, etc. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] natural sorting

2006-01-12 Thread Andrew Piskorski
, they call it dictionary sort: http://tcl.activestate.com/man/tcl8.4/TclCmd/lsort.htm -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] t() dropping NULL dimnames {was "all.equal() for mismatching names..."}

2005-12-02 Thread Andrew Piskorski
(or at least my somewhat patched version of it) does not seem to have that bug: > x <- cbind(1:2, 2:1); dimnames(x) <- list(NULL, NULL) > identical(x, t(x)) [1] T > dimnames(x) [[1]]: character(0) [[2]]: character(0) > dimnames(t(x)) [[1]]: charac

Re: [Rd] R thread safe

2005-11-08 Thread Andrew Piskorski
spect-sdm.org/Parallel-R/ http://cran.us.r-project.org/src/contrib/Descriptions/RScaLAPACK.html http://cran.us.r-project.org/src/contrib/Descriptions/taskPR.html http://cran.us.r-project.org/src/contrib/Descriptions/biopara.html http://www.omegahat.org/download/R/packages/CORBA.tar.gz --

[Rd] access to R parse tree for Lisp-style macros?

2005-10-03 Thread Andrew Piskorski
looking anywhere other than the R developer page here?: http://developer.r-project.org/ Thanks! -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] tree/graph data structure APIs?

2005-08-03 Thread Andrew Piskorski
x27;m looking for is something along the lines of an R version of the Tcllib ::struct::tree API available for Tcl: http://wiki.tcl.tk/210 http://tcllib.sourceforge.net/doc/struct_tree.html http://tcllib.sourceforge.net/doc/graph.html Thanks! -- Andrew Piskorski <[EMAIL PROTECTE