Re: [Rd] 'ordered' destroyed to 'factor'

2017-06-18 Thread Jens Oehlschlägel
: Freitag, 16. Juni 2017 um 18:31 Uhr Von: "peter dalgaard" An: "Robert McGehee" Cc: "Jens Oehlschlägel" , "r-devel@r-project.org" Betreff: Re: [Rd] 'ordered' destroyed to 'factor' > On 16 Jun 2017, at 15:59 , Robert McGehee wrote: >

[Rd] 'ordered' destroyed to 'factor'

2017-06-16 Thread Jens Oehlschlägel
)[[1]]  # ordered factor unlist(lapply(o, min))[[1]]  # no longer ordered sapply(o, min)[[1]]  # no longer ordered Jens Oehlschlägel     P.S: The above examples are silly for simple reproduction. The current behavior broke my use-case which had a structure like this   # have s

[Rd] problem in levels<- and other inconsistencies

2016-09-27 Thread Dr. Jens Oehlschlägel
# A couple of years ago # I helped making R's character NA handling more consistent # Today I report an issue with R's factor NA handling # The core problem is that # levels(g) <- levels(g) # can change the levels of g # more details below # Kind regards # Jens Oehlschlägel # Say

Re: [Rd] internal copying in R (soon to be released R-3.1.0

2014-03-03 Thread Jens Oehlschlägel
Thanks for answering Simon, > None, there is no concept of "shared" memory at R level. You seem to be mixing C level API specifics and the R language. In the former duplicate() creates a new copy. I take this as evidence that calling duplicate() is the only way to make sure I have a non-shar

[Rd] internal copying in R (soon to be released R-3.1.0

2014-03-03 Thread Jens Oehlschlägel
d-access to sxpinfo_struct.named in .Call (without setting it to 2)? That would give us more control and also save some unnecessary copying. I guess once R switches to reference-counting preventive increasing in .Call could not be continued anyhow. Kind regards Jens Oehlschlägel P.S. please cc

[Rd] read.table() with quoted integers

2013-10-04 Thread Jens Oehlschlägel
fdf (but something can be improved about read.table). It is *not* the 'best solution [...] to rewrite read.table.ffdf()' given that it nicely imports such data, see 4+1 ways to do so below. Jens Oehlschlägel # --- first create a csv file for demonstration ---

Re: [Rd] seq.int broken (seq as well) (PR#14169)

2010-01-12 Thread Jens Oehlschlägel
, I was shocked to see this, and as a consequence, I suggest we do our homework and suspend -- for a year or two -- any claims that R can be used productive such as SAS. Yours regretfully Jens Oehlschlägel __ R-devel@r-project.org mailing list https

Re: [Rd] file.rename overwrites existing target (PR#14065)

2009-11-15 Thread Jens Oehlschlägel
Thanks, An overwrite flag would be great. Would make it cristal clear what the expected behaviour is. Agree that unix behaviour should in case of doubt have priority - in this case: documentation would help windows users. Regards Jens __ R-devel@r-

[Rd] two small wishes (with code sugegstions) for R-core

2009-11-02 Thread Jens Oehlschlägel
Dear R developers, It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R. Jens Oehlschlägel # Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object # Wish no. 2: adjust

[Rd] bug or feature in read.table?

2009-09-28 Thread Jens Oehlschlägel
Hi, I guess that the followig line in read.table tmp[i[i > 0L]] <- colClasses should read tmp[i[i > 0L]] <- colClasses[i > 0L] Is this a bug? Cheers Jens Oehlschlägel -- für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 _

Re: [Rd] basename returns "." not in filename (PR#13958)

2009-09-18 Thread Jens Oehlschlägel
me("./.") [1] "." > basename("./.") [1] "." > dirname("./") [1] "." > basename("./") [1] "." Jens Oehlschlägel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Jens Oehlschlägel
al object (and the external pointer) on assignment (or even better only on modify after assignment). Best regards Jens Oehlschlägel > dispatchsecond <- function(first, second) + UseMethod("dispatchsecond", second) > > dispatchsecond.default <- function(first, second){

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Jens Oehlschlägel
al object (and the external pointer) on assignment (or even better only on modify after assignment). Best regards Jens Oehlschlägel > dispatchsecond <- function(first, second) + UseMethod("dispatchsecond", second) > > dispatchsecond.default <- function(first, second){

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Jens Oehlschlägel
s are never duplicated, you > ought to be able to take advantage of that to design the copying semantics > you want. How that? How do I know that any user has assigned/modified the external pointer (or a proxy object containing the external pointer) such that I can invoke the cloning?

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Jens Oehlschlägel
e atomic data stored on disk. I need some advice how to do this maximally performant, which probably means pure S3!? Best regards Jens Oehlschlägel -- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] How to overload the assignment operator?

2007-11-13 Thread Jens Oehlschlägel
Dear all, what is the proper way to make the assignment operator generic and define methods depending on the class of the assigned value? Best regards Jens Oehlschlägel P.S. I vaguely remember that this was possible in S+. In R I tried to no avail: # using this like h<-1:3 gives Er

[Rd] namespace crash on S3method("as.ff",function)

2007-11-05 Thread Jens Oehlschlägel
Dear all, I have defined a generic as.ff(x, ...) and a method as.ff.function(x, ...) which converts a standard R function x into a chunked version operating on large ff objects. Everything works fine, but when registering S3method("as.ff",function) in NAMESPACE, the installation fails with so

[Rd] applying duplicated, unique and match to lists?

2007-11-02 Thread Jens Oehlschlägel
tions for new classes 'hash' (requiring digest) and 'id' (and if you are curious: first code drafts for the respective ff methods). Best regards Jens Oehlschlägel # Hashing of large objects in ff # (c) 2007 Jens Oehlschägel # Licence: GPL2 # Created: 2007-10-30 # L

[Rd] indexing and regression testing

2007-08-23 Thread Jens Oehlschlägel
regression testing (to be defined). Best regards Jens Oehlschlägel P.S. > # some timings using timefactor(regtest) > library(rindex) > > Vec1 <- c(NA, paste('a', 1:100, sep="")) > Vec2 <- c(paste('a', 1:100, sep="")

[Rd] package incompatibility under 2.5.0 (p lease respond directly, I am not on r-devel)

2007-04-11 Thread Jens Oehlschlägel
ferently, I'd recommend to change "rownames" and "colnames" accordingly, in order to have symmetry between accessor and assignment functions. That would mean defining "names" and "row.names" and their assignment methods for any classes inheriting fr

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

2006-10-27 Thread Jens Oehlschlägel
te. In order not to 'break' existing code, what about adding ties.methods {"NAaverage"|"NArandom"|"NAmax"|"NAmin"} that behave consistently? Best regards Jens Oehlschlägel P.S. Please cc. me, I am not on the list > version

Re: [Rd] Subscripting fails if name of element is "" (PR#8161)

2005-10-07 Thread Jens Oehlschlägel
Dear Brian, Thanks for picking this up. I think the critical point is that it is not a single isolated bug and it would be a main effort to get this stuff consistent, because it (and implications) seems to be spread all over the code. The to be applauded efforts to properly sort out "NA" vs. as.c

Re: [Rd] Subscripting fails if name of element is "" (PR#8161)

2005-10-06 Thread Jens Oehlschlägel
The alternative would be to disallow "" in names at all. However, both alternatives rather look like code changes, not only documentation. Best regards Jens Oehlschlägel -- Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat, __ R-

[Rd] Subscripting fails if name of element is "" (PR#8161)

2005-09-30 Thread Jens Oehlschlägel
, here is the original bug report: (PR#8161) Dear all, The following shows cases where accessing elements via their name fails (if the name is a string of length zero). Best regards Jens Oehlschlägel > p <- 1:3 > names(p) <- c("a","", as.character(NA)) > p a