Re: [Rd] should base R have a piping operator ?

2019-10-05 Thread Jeff Ryan
Is there some concrete example of your “many workflows don’t even make much sense without pipes nowadays” comment? I don’t think I’m opposed to pipes in the absolute, but as I am now deep into my second decade of using R I’ve done just fine without them. As I would guess have the vast majority of

Re: [Rd] Passing R code from webpage

2013-02-17 Thread Jeff Ryan
Another really great tool, leveraging Simon's incredible work with Rserve, is to use pyRserve. Combined with Flask as a web framework you can do quite a bit with very minimal code. http://flask.pocoo.org/ http://pypi.python.org/pypi/pyRserve/ HTH Jeff On Sun, Feb 17, 2013 at 12:10 PM, Simon Ur

[Rd] formal vs. passed args: parent.frame() behavior.

2013-01-02 Thread Jeff Ryan
Happy 2013, Day 2. I can't seem to figure out why parent.frame() works differently depending on whether it is a formal/default argument or a passed argument. # code: basic setup tmp <- tempfile() A <- 101 save(A,file=tmp);rm(A) # these work as expected, loading into the parent of the c

Re: [Rd] Behavior or as.environment in function arguments/call (and force() behaviors...)

2013-01-01 Thread Jeff Ryan
ation, and I'm glad I wasn't just missing/misreading the primary docs. Best, Jeff On Tue, Jan 1, 2013 at 4:21 PM, Duncan Murdoch wrote: > On 13-01-01 4:35 PM, Jeff Ryan wrote: > >> Happy 2013! >> >> Can someone with more knowledge of edge case scoping/e

[Rd] Behavior or as.environment in function arguments/call (and force() behaviors...)

2013-01-01 Thread Jeff Ryan
Happy 2013! Can someone with more knowledge of edge case scoping/eval rules explain what is happening below? Happens in all the versions of R I have on hand. Behavior itself is confusing, but ?as.environment also provides no clue. The term used in that doc is 'search list', which is ambiguous,

Re: [Rd] methods cbind2 bind_activation disrupts cbind everywhere

2012-09-14 Thread Jeff Ryan
Refreshing the memory on performance: http://r.789695.n4.nabble.com/reduce-limit-number-of-arguments-in-methods-cbind-td921600.html#a921601 My issue had been resolved by a more careful approach taken by timeSeries. The other option is wholesale deprecation of S4 ... but I won't start that conver

Re: [Rd] R crashes when printing a named numeric vector of a specific class - Bug?

2012-09-11 Thread Jeff Ryan
print(x) in print.bar is calling print.bar again. You need to do something like print(unclass(x)) HTH Jeff On Tue, Sep 11, 2012 at 9:53 AM, Basil Abou El-Komboz wrote: > Dear useR's, > > today I stumbled over an interesting phenomenon: First, I created a > named numeric vector with a certain cl

Re: [Rd] Arrays Partial unserialization

2012-08-31 Thread Jeff Ryan
There is no such tool to my knowledge, though the mmap package can do very similar things. In fact, it will be able to do this exactly once I apply a contributed patch to handle endianess. The issue is that rds files are compressed by default, so directly reading requires uncompressing, which mak

Re: [Rd] include dll in R-package

2012-08-24 Thread Jeff Ryan
Any package can link to external DLLs. You'll need to make that an explicit dependency, have some configure script and distribute the library somewhere else, but many packages on CRAN already do this. My RBerkeley uses a user installed Oracle Berkeley DB that is linked to at configure time, of co

Re: [Rd] chown, chgrp?

2012-08-15 Thread Jeff Ryan
library(pwned)? On Wed, Aug 15, 2012 at 10:56 AM, Barry Rowlingson wrote: > On Wed, Aug 15, 2012 at 2:47 PM, Simon Urbanek > wrote: > >> >> ... and moreover with the increasing adoption of ACL on unix and >> non-existence of uid/gid on Windows this is more an archaic curiosity so I >> don't th

Re: [Rd] fast version of split.data.frame or conversion from data.frame to list of its rows

2012-05-03 Thread Jeff Ryan
A bit late and possibly tangential. The mmap package has something called struct() which is really a row-wise array of heterogenous columns. As Simon and others have pointed out, R has no way to handle this natively, but mmap does provide a very measurable performance gain by orienting rows to

[Rd] tzone DB lawsuit Implications for R-project?

2011-10-07 Thread Jeff Ryan
Does anyone from core have a comment on the implications for the R-project on this: http://www.theregister.co.uk/2011/10/07/unix_time_zone_database_destroyed/ Given the inclusion of the TZ database with R as well as the functionality used by R, is this something that the FSF is looking at yet?

Re: [Rd] Performance of .C and .Call functions vs. native R code

2011-07-14 Thread Jeff Ryan
The .Call overhead isn't the issue. If you'd like some insight into what you are doing wrong (and right), you need to provide code for the list to reproduce your timings with. This is outlined in the posting guide as well. Best, Jeff On Jul 13, 2011, at 8:28 AM, asmahani wrote: > Hello, >

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-04 Thread Jeff Ryan
Oliver, For an example of moving averages, take a look at the C source of the xts and TTR packages. The sources are browsable on R-forge. In short, REAL etc are functions to extract the data of an SEXP. They need to match the types coming in. So your C needs to check the type and branch accor

Re: [Rd] matching symbols to objects

2011-02-04 Thread Jeff Ryan
Patrick, Take a look at all.vars to start with That will return the vars as characters, from there you can use get to test/proceed. > all.vars(parse.tree) [1] "x" Best, Jeff On Fri, Feb 4, 2011 at 1:37 PM, Patrick Leyshock wrote: > Hello, > > I'm trying to access an object, given only its na

Re: [Rd] terribly annoying bug with POSIXlt : one o'clock is midnight?

2011-02-04 Thread Jeff Ryan
Much of TZ-hell (I almost dare say all) has been sorted through in xts. http://cran.r-project.org/web/packages/xts/index.html Peruse the sources for inspiration or just take some comfort in that you are not the only one ;-) Jeff On Fri, Feb 4, 2011 at 9:24 AM, Joris Meys wrote: > Been too fa

Re: [Rd] Strange behaviour of read and writeBin

2011-02-04 Thread Jeff Ryan
from ?seek ‘seek’ returns the current position (before any move), as a (numeric) byte offset from the origin, if relevant, or ‘0’ if not. Your string is nul terminated (9 bytes long). That would be the current offset. If you only read one byte, you'd have to be more than 0 bytes offset. Je

Re: [Rd] Stats not loaded? Method for as.ts() results in error

2010-09-03 Thread Jeff Ryan
Janko, You don't mention if you are using S3 or S4. A small example would make it easier to identify where your problem is. Jeff On Fri, Sep 3, 2010 at 4:44 AM, Janko Thyson wrote: > Dear list, > > > > I've got the following problem: > > > > In a package I'm trying to build, there exists a met

Re: [Rd] How do you make a formal "feature" request?

2010-08-21 Thread Jeff Ryan
The *user* decides. That would be YOU. Unlike SAS no one has a responsibility to YOU to implement some random request. Packages are how things are implemented. And to continue a previous thread ... maybe you should RTFM. Jeff On Sat, Aug 21, 2010 at 10:41 AM, Donald Winston wrote: > Who deci

Re: [Rd] segfault on 2.11.0 with large POSIXct vector using as.character

2010-05-26 Thread Jeff Ryan
> > > This has been fixed for a while in R-patched. The 2.11.1 release on Monday > should be fine. > Apparently people aren't running the betas/release candidates. You really > should run the test versions to flush out bugs. If you'd run the > pre-release versions of 2.11.0, this bug would likel

[Rd] segfault on 2.11.0 with large POSIXct vector using as.character

2010-05-26 Thread Jeff Ryan
Running "as.character" on a large POSIXct causes a segfault on my 2.11 (2010-04-22) install. Seems to crash at around 9e4 ... on OSX and Ubuntu at least. > invisible(as.character(Sys.time()+1:7e4)) > invisible(as.character(Sys.time()+1:8e4)) > invisible(as.character(Sys.time()+1:9e4)) Error: segf

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Jeff Ryan
This isn't like a local variable though, since any function above the baseenv() in the search path will also not be found. > f function(a) { rnorm(b) } > f() Error in f() : could not find function "rnorm" Jeff On Fri, May 14, 2010 at 9:20 AM, Hadley Wickham wrote: > > Hello All, > > > > By d

Re: [Rd] ranges and contiguity checking

2010-05-12 Thread Jeff Ryan
Providing the wrapper would allow for both performance as well as user-simplicity. x[RANGE(1,1e6)] and x[1:1e6] could both be handled internally, where: RANGE <- function(from,to) { structure(seq(from,to), class="RANGE") } Just testing for a 'RANGE' object in your [. method would let the optim

[Rd] gc() reports bytes (MB) but uses notation for bits (Mb)

2010-05-12 Thread Jeff Ryan
I am not a standards expert, but the notation here seems incorrect to me: > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 138668 7.5 650970 34.8 492193 26.3 Vcells 6668566 50.9 18582019 141.8 17001419 129.8 In the IEEE 1541-2002 document ( http://en.wikipedia.org/wik

Re: [Rd] optional package dependency

2010-01-14 Thread Jeff Ryan
Hi Ross, The quantmod package makes available routines from a variety of contributed packages, but gets around your issues with a bit of, um, trickery. Take a look here (unless your name is Kurt ;-) ): http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/R/buildModel.methods.R?rev=367&roo

Re: [Rd] Rcpp: Clarifying the meaning of GPL?

2009-12-23 Thread Jeff Ryan
One critical aspect to this is the fact that RcppTemplate seems to have been where the Rcpp work moved to _before_ abandoning the Rcpp project. http://cran.r-project.org/src/contrib/Archive/RcppTemplate/ So the 'namespace' of Rcpp was left with seemingly no public intention of picking it up. One

Re: [Rd] Rcpp: Clarifying the meaning of GPL?

2009-12-22 Thread Jeff Ryan
This is fantastically off-topic, and has nothing to do with *R*. Out of "courtesy" to this list, the subscribers, and future readers, please take this off-list where it belongs. Jeff On Tue, Dec 22, 2009 at 11:27 PM, Dominick Samperi wrote: > Stavros Macrakis wrote: >> >> That said, as a matter

Re: [Rd] CRAN Server download statistics (Was: R Usage Statistics)

2009-11-23 Thread Jeff Ryan
While I think download statistics are potentially interesting for developers, done incorrectly it can very likely damage the community. A basic data reporting problem, with all of the caveats attached. This information has also been readily available from the main CRAN mirror for years: http://ww

Re: [Rd] Why is strptime always returning a vector of length 9 ?

2009-08-09 Thread Jeff Ryan
The reason is in the ?strptime under value: 'strptime' turns character representations into an object of class '"POSIXlt"'. The timezone is used to set the 'isdst' component and to set the '"tzone"' attribute if 'tz != ""'. And POSIXlt is a list of length 9. HTH Jeff On Sun, Aug 9,

Re: [Rd] Bug in nlm, found using sem; failure in several flavors (PR#13881)

2009-08-07 Thread Jeff Ryan
Adam, It seems that your attachment didn't make it through. That aside, my experience with strange errors like those (random type not implemented ones) has been that you may be looking at a memory problem on you machine. Given that you can't replicate on another platform (and the .csv file didn't

Re: [Rd] inheriting C symbols

2009-08-05 Thread Jeff Ryan
re is no way to add text > to the DESCRIPTION file saying "and load the symbols too"?  It would be > much simpler.  Also a bit more dangerous of course, since function > prototypes are not being exported via a header. > >  Terry T > > > On Wed, 2009-08-05 at 11

Re: [Rd] inheriting C symbols

2009-08-05 Thread Jeff Ryan
This has been discussed before: http://www.nabble.com/Dynamic-linking-to-binary-code-from-other-packages---td20167535.html#a20474561 Take a look at 'xts' on cran, or R-forge. Specifically: http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/inst/api_example/README?rev=386&root=xts&view=

Re: [Rd] How to create a permanent dataset in R.

2009-07-24 Thread Jeff Ryan
The biggest help would come by not pretending to be Albert Einstein. hTh, Jeff On Fri, Jul 24, 2009 at 1:11 AM, Albert EINstEIN wrote: > > > Hi everybody, > > Actually, we know that If we create a dataset in R ,after closing the > session the dataset automatically is closed. I tried for creating

Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-19 Thread Jeff Ryan
ise) who knows a bit more about the internals of socket connections in R (w.r.t Windows - as *nix works fine) could provide some much needed insight. Best, Jeff Ryan On Mon, May 18, 2009 at 12:40 PM, Jeff Ryan wrote: > R-devel: > > I am encountering a consistency issue using socketCon

Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-18 Thread Jeff Ryan
yacas.  You could look at its source code in case it brings anything to mind. > > On Mon, May 18, 2009 at 1:40 PM, Jeff Ryan wrote: >> R-devel: >> >> I am encountering a consistency issue using socketConnection and >> readBin with *non-blocking* connections on Unix and Win

[Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-18 Thread Jeff Ryan
Ì’ò\001 |ò\001\004“ò\001ä“ò\0010\177ò\001ø•ò\001è{ò\001<“ò\001 $ƒ\001Ü•ò\001à}ò\001 “ò\001 $ƒ\001 $ƒ\001\024\177ò\001 $ƒ\001t“ò\001¨”ò\001ü}ò\001 $ƒ\001 $ƒ\001t|ò\001 $ƒ\001 $ƒ\001ô\177ò\001œ—ò\001ä|ò\001 |ò\001 $ƒ\001d—ò\001 $ƒ\001è’ò\001x{ò\001 $ƒ\001" [77] "' mus

Re: [Rd] bug of *switch* function

2009-03-09 Thread Jeff Ryan
This isn't a bug in R. You are assigning within the switch statement, and it is returning the first TRUE value (human). Use "=" not "<-" species <- switch(organism, human="HS", fly="DM", yeast="SC") > species [1] "SC" HTH Jeff On Mon, Mar 9, 2009 at 8:55 AM, guangchuang yu wrote: > Hi, > > W

[Rd] POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59

2009-02-27 Thread Jeff Ryan
ide. Jeff > sessionInfo() R version 2.9.0 Under development (unstable) (2009-02-27 r48020) i386-apple-darwin8.11.1 locale: C attached base packages: [1] stats graphics grDevices utils datasets methods base # C PROGRAM # #include #include /* code modified from:

Re: [Rd] length of POSIXlt object (PR#13482)

2009-01-29 Thread Jeff Ryan
Read the docs. POSIXlt is a list of 9 elements. Each element length is what you think it should be returning. That is not correct. ?POSIXlt Details: There are two basic classes of date/times. Class '"POSIXct"' represents the (signed) number of seconds since the beginning of 1970

Re: [Rd] package development

2008-12-12 Thread Jeff Ryan
I think the /tmp file gets removed: ERROR: lazy loading failed for package 'xts' ** Removing '/private/tmp/Rinst625532301/xts' ERROR Installation failed. Removing '/tmp/Rinst625532301' At least it seems to when I run R CMD from the shell. > > Yes, there are several options for not distributing

Re: [Rd] package development

2008-12-12 Thread Jeff Ryan
A quick comment on two subjects: First to get the line # from the command line: cat pkg/R/* > all.R wc all.R vim +LINE all.R (or pick you favorite method here...) >From there it should be easy enough to get context. At least enough to grep back into the R directory. Also, the use of unit-test

Re: [Rd] any suggestions to deal with 'Argument list too long' for a R CMD check?

2008-12-09 Thread Jeff Ryan
Never used, but I seem to recall that this was good for that: http://en.wikipedia.org/wiki/Xargs Jeff On Tue, Dec 9, 2008 at 3:13 PM, Whit Armstrong <[EMAIL PROTECTED]> wrote: > Since, gcc was using upwards of 2gb of ram to compile my package, I > just split all the functions into individual fil

Re: [Rd] reduce limit number of arguments in methods:::cbind

2008-12-03 Thread Jeff Ryan
My 2c: The real issue for me is that this approach to handling S4 objects by altering R functions for the worse is incorrect. (by calling bind_activation) m <- matrix(1:2e6L) # 2 million obs > system.time(cbind(m,m)) user system elapsed 0.027 0.017 0.044 > methods:::bind_activation(TRU

Re: [Rd] Problem trying to download rimage package (second try)

2008-11-14 Thread Jeff Ryan
You are receiving no reply to your request as you are asking a list for R package and core developers about a single package (1 of 1600+ on CRAN alone). 1) You should first try everything possible yourself to fix the problem, AND show your work... (as per posting rules) 2) Then contact the mainta

Re: [Rd] Dynamic linking to binary code from other packages??

2008-11-12 Thread Jeff Ryan
Charles, > I've looked through the "Writing R Extensions" manual, and can't find > this documented very clearly. A previous question to the list gave me > the very kind response pasted below. I've looked at the suggested > examples (lme4 using C functions from Matrix). It isn't really "clearly"

Re: [Rd] .C(..., DUP=FALSE) memory costs depending on input size?

2008-11-06 Thread Jeff Ryan
Marcel, If you are writing the C code from scratch, take a look at either .Call or .External, as both make no copies of the input objects, and require no explicit conversion to the underlying storage type (numeric/integer/etc) within the function call. An even greater benefit is that you will als

Re: [Rd] conditionally import a namespace?

2008-10-30 Thread Jeff Ryan
Or something along the lines of: Suggests: RGtk2 f <- function (x, ...) { stopifnot("package:RGtk2" %in% search() || require("RGtk2", quietly = TRUE)) # do Rgtk2 stuff here } Jeff On Thu, Oct 30, 2008 at 9:15 AM, Martin Maechler <[EMAIL PROTECTED]> wrote: >> "FA" == Felix Andrews <

Re: [Rd] Dates in C api

2008-09-17 Thread Jeff Ryan
If you are looking for examples of handling dates/times (specifically POSIXct) within C code, the dev branch of xts has quite a bit of code now. http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/dev/pkg/src/?root=xts Assigning the class (or any attribute) within the C code will be much fast

Re: [Rd] Passing method to returns() /fSeries (PR#12713)

2008-09-05 Thread Jeff Ryan
This is a concern of the package maintainer. Nothing to do with R-devel or R-bugs. See the Rmetrics site or fSeries package details for their contact information. Jeff On Fri, Sep 5, 2008 at 10:05 AM, <[EMAIL PROTECTED]> wrote: > Full_Name: Robert Iquiapaza > Version: 2.7.2 > OS: Vista > Submi

Re: [Rd] Routine and Deep testing with R CMD check

2008-06-11 Thread Jeff Ryan
A combination of RUnit from CRAN and .Rbuildignore provide a workable solution for the 'xts' package I work on, though this obviously removes the tests from the distributed code. http://cran.r-project.org/web/packages/RUnit/index.html --and-- http://wiki.r-project.org/rwiki/doku.php?id=developer

Re: [Rd] numbers after dot missing (PR#10663)

2008-01-30 Thread Jeff Ryan
YOU can fix the "problem" : ) Try: > identical(76079320.32 + 21374.27 + 7630.04 + 28432.47,76136757.1) [1] TRUE > identical(76079320.32 + 21374.27 + 7630.04 + 28432.47,76136757) [1] FALSE > options(digits=10) > 76079320.32 + 21374.27 + 7630.04 + 28432.47 [1] 76136757.1 > sessionInfo() R versio

[Rd] as.Date.numeric origin default

2007-12-30 Thread Jeff Ryan
what will undoubtedly cost many hours of debugging across all packages/users. Thank you for your consideration, Jeff Ryan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel