search for: incompar

Displaying 20 results from an estimated 74 matches for "incompar".

Did you mean: incompat
2008 Sep 12
1
match and incomparables
Hello, I was playing around with the newly implemented 'incomparables' argument in 'match' and realized the argument does not behave anything like I expected. Can someone explain what is going on here? Sorry if I'm misreading the documentation. > match(1:3, 1:3, incomparables=1) [1] NA 2 3 # This seems right, the 1 in 'x' is 'i...
2009 Mar 30
1
duplicated fails to rise correct errors (PR#13632)
Full_Name: Wacek Kusnierczyk Version: 2.8.0 and 2.10.0 r48242 OS: Ubuntu 8.04 Linux 32 bit Submission from: (NULL) (129.241.110.161) In the following code: duplicated(data.frame(), incomparables=NA) # Error in if (!is.logical(incomparables) || incomparables) .NotYetUsed("incomparables != FALSE") : # missing value where TRUE/FALSE needed the raised error is clearly not the one intended to be raised. ?duplicated says: " incomparables: a vector of values that can...
2004 Aug 19
0
suggesting a new feature for unique()
...cated.R: *** R-devel/src/library/base/R/duplicated.R Tue Jul 20 12:45:52 2004 --- duplicated.R Thu Aug 19 14:50:38 2004 *************** *** 34,50 **** ## NB unique.default is used by factor to avoid unique.matrix, ## so it needs to handle some other cases. ! unique.default <- function(x, incomparables = FALSE, ...) { if(!is.logical(incomparables) || incomparables) .NotYetUsed("incomparables != FALSE") z <- .Internal(unique(x)) if(is.factor(x)) ! factor(z, levels = seq(len=nlevels(x)), labels = levels(x), ! ordered = is.ordered(x)) el...
2007 Nov 02
0
applying duplicated, unique and match to lists?
...g speeds up match system.time({z <- lapply(y, md5); match(z,zt)}) system.time({z <- sapply(y, md5); zt <- sapply(y, md5); pos<-match(z,zt); all(sapply(seq(along=pos), function(i)identical(z[i],zt[pos[i]])))}) rm(x) } duplicated.matrix <- duplicated.array <- function (x, incomparables = FALSE, fromLast = FALSE, MARGIN = 1, hashFUN=list, ...) { if (!is.logical(incomparables) || incomparables) .NotYetUsed("incomparables != FALSE") ndim <- length(dim(x)) if (length(MARGIN) > ndim || any(MARGIN > ndim)) stop("MARGIN = ",...
2001 Nov 20
2
is match slow?
I'm doing m <- match(matriz, origen, 0) where matriz is a 270x900 matrix and origen a 11675 elements vector, and is taking a very long time. Is match a function implemented in C? If not, would a C code be faster? Thanks Agus Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo at ija.csic.es
2010 Jun 29
2
POSIXlt matching bug
...;x'". I would normally suggest that we add a POSIXlt method for match that converts x into POSIXct or character first. However, match does not appear to be generic. Below is a possible rewrite of match that appears to work as desired. match <- function(x, table, nomatch = NA_integer_, incomparables = NULL) .Internal(match(if(is.factor(x)||inherits(x, "POSIXlt")) as.character(x) else x, if(is.factor(table)||inherits(table, "POSIXlt")) as.character(table) else table, nomatch, incomparables)) That said, I understand some peop...
2016 Jun 08
1
Trivial patch for merge.Rd
...2,7 @@ columns?} \item{suffixes}{a character vector of length 2 specifying the suffixes to be used for making unique the names of columns in the result - which not used for merging (appearing in \code{by} etc).} + which are not used for merging (appearing in \code{by} etc).} \item{incomparables}{values which cannot be matched. See \code{\link{match}}. This is intended to be used for merging on one column, so these are incomparable values of that column.} Thanks, Marc Schwartz -------------- next part -------------- An embedded and charset-unspecified text was scrubbed....
2008 May 08
1
[PATCH] Typo in 'unique' help page (PR#11401)
...rc/library/base/man/unique.Rd | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/library/base/man/unique.Rd b/src/library/base/man/unique.Rd index a8397c7..4664a34 100644 --- a/src/library/base/man/unique.Rd +++ b/src/library/base/man/unique.Rd @@ -29,7 +29,7 @@ unique(x, incomparables = FALSE, \dots) \item{x}{a vector or a data frame or an array or \code{NULL}.} \item{incomparables}{a vector of values that cannot be compared. \code{FALSE} is a special value, meaning that all values can be - compared, and nay be the only value accepted for methods other than +...
2010 Jan 18
0
Fix for bug in match()
Hello all, I posted the following bug last week: # These calls work correctly: match(c("A", "B", "C"), c("A","C"), incomparables=NA) # okay match(c("A", "B", "C"), "A") # okay match("A", c("A", "B"), incomparables=NA) # okay # This one causes R to hang: match(c("A", "B", "C"), "A", incomparables=NA) I found th...
2004 Apr 12
1
question on isoMDS
Hello everyone, I have a question on isoMDS. My data set (of vegetation) with 210 samples is in this way: Rotfoehrenau Lavendelweidenau Silberweidenau .... 067_Breg.7 0 2 0 .... 071_Dona.4 0 2 6 .... ... I want to do an isoMDS-analysis with the dissimilarity index
2015 Jan 23
1
:: and ::: as .Primitives?
...ced. From a developer perspective, especially when debugging, when we do selectMethod("match", ...) and it turns out that this returns the default method, it's good to see: Method Definition (Class "derivedDefaultMethod"): function (x, table, nomatch = NA_integer_, incomparables = NULL, ...) base::match(x, table, nomatch = nomatch, incomparables = incomparables, ...) <environment: namespace:BiocGenerics> Signatures: x table target "DataFrame" "ANY" defined "ANY" "ANY&quo...
2011 Oct 05
1
unique possible bug
...ile everything? Thanks, Patrick McCann Here is a simple to reproduce example: > runif(2^29+5)->a > sum(unique(a))->b Error in unique.default(a) : length 536870917 is too large for hashing > traceback() 3: unique.default(a) 2: unique(a) 1: unique(a) > unique.default function (x, incomparables = FALSE, fromLast = FALSE, ...) { z <- .Internal(unique(x, incomparables, fromLast)) if (is.factor(x)) factor(z, levels = seq_len(nlevels(x)), labels = levels(x), ordered = is.ordered(x)) else if (inherits(x, "POSIXct")) structure(z, class =...
2012 Dec 08
1
namespace S3 and S4 generic imports cannot both be satisfied:
PkgA wishes to write a method for 'unique' on S4 class 'A'. ?Methods indicates that one should setGeneric("unique") setClass("A") unique.A <- function(x, incomparables=FALSE, ...) {} setMethod(unique, "A", unique.A) Both S3 and S4 methods need to be exported in the NAMESPACE import(methods) S3method(unique, A) exportMethods(unique) PkgB introduces a new class and method setClass("B") unique.B <- function(x, incomp...
2010 Sep 17
0
Merging data frames on a variety of columns
...2004 The idea is to figure out which companies in the first set are not in the second set. My approach so far is to do various merges and then remove the matches from the original data frame... m1 <- merge(df1, df2, by = c("identifier1", "identifier2", "year"), incomparables=NA) m2 <- merge(df1, df2, by = c("name", "year"), incomparables=NA) m3 <- merge(df1, df2, by.x = c("other_name", "year"), by.y = c("name", "year"), incomparables = NA) Is this really the best way to accomplish my goal? Also,...
2011 Sep 28
3
[LLVMdev] Greedy Register Allocation in LLVM 3.0
...criptions and papers. The typical question then will be "Which LLVM register allocator was meant?" ;-) I propose "the LLVM 3.0 register allocator". We have no plans to throw away the greedy allocator in 3.1, but we'll probably make major enhancements to it, which make it incomparable to 3.0. If it does eventually get thrown away and replaced, then a version number can capture that. -Chris
2012 Sep 27
3
Keep rows in a dataset if one value in a column is duplicated
...eginning to learn R, so I apologize if the code is really rough. Basically I want to keep all the rows in the data set for which the value of "Pairiddups" is TRUE. How do I do it? And how do I get past the error? Thank you so much, Diana PairID<-c(Health2$pairid) duplicated(PairID, incomparables=TRUE, fromLast=TRUE) PairIDdup=duplicated(PairID) cbind(PairID, PairIDdup) PairID[which(PairIDdup)] PairIDDuplicates<-PairID%in%PairID[which(PairIDdup)] PairIDs<-cbind(PairID, PairIDDuplicates) colnames(PairIDs)<-c("Pairid","Pairiddups") Health2PairsOnly<-Pa...
2010 Mar 24
1
Deleting duplicate rows in a matrix at random
Hello, I am relatively new to R, and I've run into a problem formatting my data for input into the package RankAggreg. I have a matrix of gene titles and P-values (weights) in two columns: KCTD12 4.06904E-22 UNC93A 9.91852E-22 CDKN3 1.24695E-21 CLEC2B 4.71759E-21 DAB2 1.12062E-20 HSPB1 1.23125E-20 ... The data contains many, many duplicate gene titles, and I need to remove all but one of
2011 Sep 28
0
[LLVMdev] Greedy Register Allocation in LLVM 3.0
...and papers. The typical question then will be "Which LLVM register allocator was meant?" ;-) > > I propose "the LLVM 3.0 register allocator". We have no plans to throw away the greedy allocator in 3.1, but we'll probably make major enhancements to it, which make it incomparable to 3.0. If it does eventually get thrown away and replaced, then a version number can capture that. That makes a lot of sense to me. None of the algorithm details are sacred, and there is a good chance something essential will have changed by 3.1 and 3.2. Meanwhile, I am keeping the RegAllo...
2006 Jun 03
10
Ruby on Rails on MacBook
Hi, I''m trying to set up Ruby on Rails following Apple''s tutorial with ruby 1.8.4 and mysql 5.0.22. But every time I ran ''rake migrate'' I got the following access denied error: Access denied for user ''root''@''localhost'' (using password: YES) After turning on --trace switch, it showed the error happened at the following
2010 Jan 16
2
Extracing only Unique Rows based on only 1 Column
...on available, at least based on what I've read in the help file. A simplified example matrix (designated as "traveltimes"): ID Time1 Time2 1 3 4 1 4 7 2 3 5 2 5 6 3 4 5 3 2 8 When I use a command such as matches <- unique(traveltimes, incomparables = FALSE, fromLast = FALSE) I will end up with a 6-row matrix, exactly what I already have. What I would like to do is to remove the duplicate values in the column labeled "ID" and their associated Time1 and Time2 entries. This will give me a 3x3 matrix which contains only one...