similar to: setdiff bizarre (was: odd behavior out of setdiff)

Displaying 20 results from an estimated 1000 matches similar to: "setdiff bizarre (was: odd behavior out of setdiff)"

2009 May 29
2
Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified
I think I am using the improved version of setdiff(...) that handles data.frames, so I think some odd behavior was expected but this one is escaping me. It appears that the the addition of duplicate entries is not caught by the setdiff(...). Is this expected behavior? If so, is there another method or approach that should be used to identify duplicate row entries between two different data
2007 Dec 10
1
setdiff for data frames
Hello, I have been interested in setdiff() for data frames that operates row-wise. I looked in the documentation, mailing lists, etc., and didn't find exactly the right thing. Given data frames A, B with the same columns, the goal is to extract the rows that are in A, but not in B. Of course, one can usually do setdiff(rownames(A), rownames(B)) but that is cheating. :-) I played around a
2004 Feb 27
1
question about setdiff()
Thank you for your answers, I have another question: the behaviour of setdiff(indicesFalse, indicesNA) does not seem predictable to me. > indices [1] 1 2 3 4 5 6 > compareVector [1] NA TRUE TRUE TRUE FALSE NA > indicesNA = indices[is.na(compareVector)] > indicesNA [1] 1 6 > indicesFalse = indices[compareVector == FALSE] > indicesFalse [1] NA 5 NA >
2013 Feb 01
2
how to setdiff on lists of lists
Dear List, I have a data structure like: > aa [[1]] [1] 1 2 3 [[2]] [1] 4 5 6 > bb [[1]] [1] 3 [[2]] [1] 5 I would like to set differences between "aa" and "bb" and get as result another list of lists like: > res [[1]] [1] 1 2 [[2]] [1] 4 6 I am trying: lapply(aa, setdiff, bb) but I simply get "aa" back as result. Could you please point me in the
2013 Jul 18
3
setdiff y/o intersect para diferencias entre vectores
hola, tengo dos vectores de 1134 y 385 elementos que se corresponden con números de accesión de genes. Necesito saber que números son comunes o intersección de vectores. He utilizado intersect(x,y) y me da todo el rato un único valor: V1 V1.1 V1.2 V1.3 V1.4 V1.5 V1.6 V1.7 V1.8 V1.9 V1.10 V1.11 V1.12 1 AJ558305 AJ558305 AJ558305 AJ558305 AJ558305
2010 Jul 29
4
looking for setdiff equivalent on dataset
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100729/2fc86d3d/attachment.pl>
2013 Jul 23
0
setdiff y/o intersect para diferencias entre vectores
Hola Marcos. Yo probaría algo del estilo a esto.... Intersecc<-v1[v1%in%v2] Un saludo, _____________________________ Miguel Ángel Rodríguez Muíños Dirección Xeral de Innovación e Xestión da Saúde Pública Consellería de Sanidade Xunta de Galicia http://dxsp.sergas.es -----Mensaje original----- De: r-help-es-bounces en r-project.org [mailto:r-help-es-bounces en r-project.org] En nombre
2008 Nov 24
14
how to test for the empty set
Dear R-help, I first thought that the empty set (for a vector) would be NULL. x <- c() x However, the documentation seems to make clear that there _many_ empty sets depending on the vector's mode, namely, numeric(0), character(0), logical(0), etc. This is borne out by y <- letters[1:3] z <- letters[4:6] intersect(y,z) which, of course, is non-NULL: is.null(character(0)) #
2012 Aug 14
1
Can we interlink these three if conditions?
key1.=c(1, 2, 3) key2.=c(2) if (identical(key1.,key2.) == "TRUE") { cat("No Errors found") } if (length(setdiff(key1., key2.)) !=0) {
1999 Jul 20
2
tensor() function and sets
Hi Everyone, To complete the outer() and kronecker() functions in the base, may I suggest the following tensor() function, which allows the multiplication of arrays through sets of conformable dimensions. I am happy to write a help page if required. The code also needs a setdiff() function which prompts me to ask: what about simple set functions? I expect many of us have written our own
2009 Apr 04
1
comparing columns in a dataframe
hello, I am hoping for some advice regarding comparing variables from 3 versions of a spreadsheet which have been combined into a single dataframe. The aim is to identify which rows have been changed. The dataframe contains 177 rows of data (each cell contains text). 'intersect' produced a file with 35 rows, 'union' a file with 303 rows and 'setdiff' a file with 130
2012 Jan 15
2
determining the difference between 2 character strings
Hi, I am struggling, I have 2 lists with shared elements, one ~600, one ~1000, and I need to determine the difference between them. They are character strings, and to use setdiff(), or unique() I need vectors. I don't know how to force these character strings into a form where you can use functions like setdiff(). Any help would be greatly appreciated. > head(R1) [1]
2012 Jun 25
2
setdiff datframes
hi, I have 2 files example 1 and example 2 and would like to know what is in example2 and not in example1 (attached) V1 contain data which could be in duplicated which I am using as identifiers I used setdiff(example2$V1,example1$V1) to find the identifiers which are specific to example2: [1] "rs2276598" "rs17253672" I am looking for a way to get an output with all
2020 May 20
3
Feature Request: User Prompt + Message First Execution when "Managing Search Path Conflicts"
Dear R Developers, ### # Context: ### When managing Search Path Conflicts (See: https://developer.r-project.org/Blog/public/2019/03/19/managing-search-path-conflicts/index.html), with: options(conflicts.policy = "strict") We get the following behaviour when loading a package (Eg: dplyr): library(dplyr) ## Error: Conflicts attaching package ?dplyr?: ## ## The following objects are
2012 Jun 27
2
a problem of approach
Dear R-help list, Part of a program I wrote seem to take a significant amount of time, therefore I am looking for an alternative approach. In order to explain what is does: - the input is a sorted vector of integer numbers - some higher numbers may be derived (using a mathematical formula) from lower numbers, therefore they should be eliminated - at the end, the vector should contain only
2010 Dec 16
2
Compare two dataframes
Hello, I have two dataframes DF1 and DF2 that should be identical but are not (DF1 has some rows that aren't in DF2, and vice versa). I would like to produce a new dataframe DF3 containing rows in DF1 that aren't in DF2 (and similarly DF4 would contain rows in DF2 that aren't in DF1). I have a solution for this problem (see self contained example below) but it's awkward and
2012 Aug 21
2
Iterative sampling with restrictions
Hi all, I'm working on a seemingly trivial problem that I can't figure out how to implement in R. I'd be most grateful for any help here. I want to do the following: first, randomly assign each of n units to one of g groups of size n/g. Then, randomly re-assign each of the n units to a different group (i.e., same as the first step, but the unit can't be assigned to a group to
2008 Jan 10
0
prob package: elementary probability on finite sample spaces
Dear R Community, I am pleased to announce the beta-release of the prob package. The source code is now on CRAN, and binaries should be generated there before long. In the meantime, you can get it with install.packages("prob", repos = "http://r-forge.r-project.org") The prob package gives a framework for doing elementary probability on finite sample spaces in R. The
2008 Jan 10
0
prob package: elementary probability on finite sample spaces
Dear R Community, I am pleased to announce the beta-release of the prob package. The source code is now on CRAN, and binaries should be generated there before long. In the meantime, you can get it with install.packages("prob", repos = "http://r-forge.r-project.org") The prob package gives a framework for doing elementary probability on finite sample spaces in R. The
2009 May 14
2
can you tell what .Random.seed *was*?
Dear R-help, Suppose I write a script that looks something like this: #### script.R set.seed(something) x <- rnorm(100) y <- runif(500) # bunch of other stuff save.image() ### end of script.R Now, I give you a copy of my script.R (with the set.seed statement removed, of course) together with the .RData file that was generated by the save.image() command. Question: 1) can you tell