similar to: Deleting duplicate rows in a matrix at random

Displaying 20 results from an estimated 100 matches similar to: "Deleting duplicate rows in a matrix at random"

2010 Mar 30
2
Choosing and preserving a random duplicate
Dear R-Helpers, I have a dataframe (g10df) formatted like this: GENE PVAL 1 KCTD12 4.06904e-22 2 UNC93A 9.91852e-22 3 CDKN3 1.24695e-21 4 CLEC2B 4.71759e-21 5 DAB2 1.12062e-20 The rows are ranked in ascending order by PVAL, and I need to end up with the same relative order. There are duplicate entries for genes in the first column with corresponding
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
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 'incomparable' >
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
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
2010 Jun 29
2
POSIXlt matching bug
I came across the below mis-feature/bug using match with POSIXlt objects (from strptime) in R 2.11.1 (though this appears to be an old issue). > x <- as.POSIXlt(Sys.Date()) > table <- as.POSIXlt(Sys.Date()+0:5) > length(x) [1] 1 > x %in% table # I expect TRUE [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > match(x, table) # I expect 1 [1] NA NA NA NA NA NA NA NA
2008 May 08
1
[PATCH] Typo in 'unique' help page (PR#11401)
--- src/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
2012 Sep 27
3
Keep rows in a dataset if one value in a column is duplicated
Hi, I have a data set of observations by either one person or a pair of people. I want to only keep the pair observations, and was using the code below until it gave me the error " $ operator is invalid for atomic vectors". I am just beginning 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
2015 Jan 23
1
:: and ::: as .Primitives?
Hi, On 01/23/2015 07:01 AM, luke-tierney at uiowa.edu wrote: > On Thu, 22 Jan 2015, Michael Lawrence wrote: > >> On Thu, Jan 22, 2015 at 11:44 AM, <luke-tierney at uiowa.edu> wrote: >>> >>> For default methods there ought to be a way to create those so the >>> default method is computed at creation or load time and stored in an >>>
2011 Oct 05
1
unique possible bug
Hi, I am trying to read in a rather large list of transactions using the arules library. It seems in the coerce method into the dgCmatrix, it somewhere calls unique. Unique.c throws an error when n > 536870912; however, when 4*n was modified to 2*n in 2004, the overflow protection should have changed from 2^29 to 2^30, right? If so, how would I change it in my copy? Do I have to recompile
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)
2010 Jan 16
2
Extracing only Unique Rows based on only 1 Column
To Whomever is Interested, I have spent several days searching the web, help files, the R wiki and the archives of this mailing list for a solution to this problem, but nonetheless I apologize in advance if I have missed something obvious. The problem is this; I have a 5-column data frame with about 4.2 million rows, and want to create a new (and hopefully much smaller) data frame that
2016 Jun 08
1
Trivial patch for merge.Rd
Hi all, After replying to r-help earlier today on the merge() related thread, I noted a trivial grammatical error in the description for the 'suffixes' argument in it's help file. A patch against the current SVN trunk version of merge.Rd in ..library/base/man is attached and pasted here: --- merge1.Rd 2016-06-08 13:34:35.000000000 -0500 +++ merge2.Rd 2016-06-08 14:03:34.000000000
2013 Oct 30
1
unique(1:3,nmax=1) freezes R
Dear all, I was playing around with factor contrasts, and found the argument nmax on function factor. When using nmax=1, R froze completely, and I had to close it from task manager. After some debugging, I found that the problem is actually in unique-function, where the internal unique function is called: .Internal(unique(x, incomparables, fromLast, nmax)) More generally, it looks like
2012 Jan 17
1
arguments in merge() not accepted
dear r-listers, this may be some rally stupid mistake, but googling didn't help me any further: > merge(data1, data2, all.x=T) gives back: :?Error in merge(data1, data2, all.x = T) : : unused argument(s) (all.x = T) [same with any other argument i try to put in..] although the man page states >merge(x, y, by = intersect(names(x), names(y)), > by.x = by, by.y = by, all =
2011 Dec 15
1
R CMD check fails to warn about undocumented classes and methods
In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" PkgA promotes 'unique' to a generic and exports that DESCRIPTION: Imports: methods R/f.R: setGeneric("unique") NAMESPACE: export(unique) and PkgB creates and exports a method on unique DESCRIPTION Imports: methods, PkgA R/f.R: setClass("B",
2014 Nov 17
1
common base functions stripping S3 class
Hi all --- this is less a specific question and more general regarding S3 classes. I've noticed that quite a few very common default implementations of generic functions (e.g. `unique`, `[`, `as.data.frame`) strip away class information. In some cases, it appears conditionals have been created to re-assign the class, but only for a few special types. For example, in `unique.default`, if the
2011 Dec 15
1
S4 NAMESPACE method imports and exports do not include (promoted?) generics
In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" section 1.6.6 of 'Writing R Extensions' says Note that exporting methods on a generic in the namespace will also export the generic, and exporting a generic in the namespace will also export its methods. and Note that importMethodsFrom will also import any generics defined in
2015 Nov 03
1
Major Platform Discrepancies
I posted a question on stackoverflow dealing with determining elemental existence in a vector, and to my surprise, the method that was brutally slow for me on my PC was insanely fast on one of the member's platform (he was running Linux). You can view the details here. http://stackoverflow.com/questions/33453141/most-efficient-way-to-determine-if-element-exists-in-a-vector I didn't know
2008 Aug 16
1
unique.default problem (PR#12551)
Full_Name: Vilmos Prokaj Version: R 2.7.1 OS: windows Submission from: (NULL) (213.181.195.84) Dear developers, The following line of code (produced by a mistake) caused an infinite loop unique("a",c("a","b")) or also unique(1,1:2) I made a little investigation, and it seems to be that the following function from unique.c is looping infinitely static int