similar to: duplicated() on zero-column data frames returns empty

Displaying 20 results from an estimated 1000 matches similar to: "duplicated() on zero-column data frames returns empty"

2024 Apr 08
1
duplicated() on zero-column data frames returns empty
I appreciate the compliment from Ivan and still share the puzzlement at the empty return. What is the policy for changing something that is wrong? There is a trade-off between breaking old code that worked around a problem and breaking new code written by people who make reasonable assumptions. Mathematically, it seems obvious to me that duplicated.matrix(A) should do something like this: v
2024 Apr 07
1
duplicated() on zero-column data frames returns empty
? Fri, 5 Apr 2024 16:08:13 +0000 Jorgen Harmse <JHarmse at roku.com> ?????: > if duplicated really treated a row name as part of the row then > any(duplicated(data.frame(?))) would always be FALSE. My expectation > is that if key1 is a subset of key2 then all(duplicated(df[key1]) >= > duplicated(df[key2])) should always be TRUE. That's a good argument, thank you! Would
2011 May 02
2
INSERT OR UPDATE
I'm trying to insert rows of a data.frame into a database table, or update where the key fields of a record already exist in the table. I've come up with a possible solution below, but would like to hear if anyone has a better solution. # The problem demonstrated: # Create a data.frame with test values library(RODBC) tbl <- data.frame( key1 = rep(1:3, each = 2), key2 =
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) {
2013 Jan 18
5
reading multiple key=value pairs per line
Hi, Thanks for a great environmentfor statistical computing :-) I have some input data in a file ("input_kvpairs.csv") of the form key1=23, key2=67, key3="hello there" key1=7, key2=22, key3="how are you" key1=2, key2=77, key3="nice day, thanks" Now in my head I wish it was of the form ("input.csv") #key1, key2, key3 23, 67, "hello
2015 May 30
3
Using two agents
On 30/05/15 08.34, Nico Kadel-Garcia wrote: > On Sat, May 30, 2015 at 8:00 AM, Kasper Dupont > <kasperd at kdxdx.23.may.2015.kasperd.net> wrote: > > As far as I can tell when the ssh command uses an agent to > > authenticate to a server and then forwards an agent to that > > server, it will always use the same agent for both purposes. > > > > Has there
2009 Mar 04
3
Table Transformation
Dear R-experts, recently, I started to discover the world of R. I came across a problem, that I was unable to solve by myself (including searches in R-help, etc.) I have a flat table similar to key1 key2 value1 abcd_1 BP 10 abcd_1 BSMP 1A abcd_1 PD 25 abcd_2 BP 20 abcd_3 BP 80 abcd_4 IA 30 abcd_4 PD 70 abcd_4 PS N I wish to transform this table to obtain the following result: key2 key1 BP
2005 Feb 24
1
Place more than one key with xyplot
Dear R-users I have some trouble to generate more than one key with xyplot using the legend argument. I would like one key with rectangles: library(lattice) library(grid) key1 <- list(rectangles = list(col= c(rev(heat.colors(5))[1:5], rev(heat.colors(5))[4:1])), title="Percentiles", space="right",
2010 Aug 23
1
Sort ordering
Using MultiValueSorter, I can sort by key1, key2, relevance; or relevance, key1, key2. But AFAIK, I can't sort by key1, relevance, key2. Unless I spool out the entire result set or write some C++. I wonder if we need a new 'sort by' function that accepts any combination of keys and relevance in any order? The function would make it's own optimisations (ie is relevance first or
2010 Mar 03
1
data.table evaluating columns
Hi everyone, I have the following code that works in data frames taht I would like tow ork in data.tables . However, I'm not really sure how to go about it. I basically have the following names = c("data1", "data2") frame = data.frame(list(key1=as.integer(c(1,2,3,4,5,6)), key2=as.integer(c(1,2,3,2,5,6)),data1 = c(3,3,2,3,5,2), data2= c(3,3,2,3,5,2))) for(i in
2005 Aug 08
1
php_serialize-1.0.2.1.rb questions
Has anyone used this to get data out of PHP sessions? I can get data out using the php_unserialize function however I am getting a array of strings that looks like this: ["key1: data1","key2: data2"] I would rather get RoR session style of associative arrays ["key1"=>"data", "key2"=>"data2"] Am I just being dense and there is an
2024 May 13
1
duplicated() on zero-column data frames returns empty
>?If you would like to try your hand at developing a patch and make a > case for it at R-devel or the Bugzilla, the resources at > <https://contributor.r-project.org/> can be helpful. I am attempting to get admitted onto the Bugzilla at the moment for the data frame cases, fingers crossed! Best Regards,Mark Webster [[alternative HTML version deleted]]
2009 Sep 08
1
Function to query ASTDB families
Hi, Asterisk database is made of <family><key> records such as: fam key1 val1 fam key2 val2 ... fam key100 val100 I'm looking for the smartest way to iterate among different keys associated to a given family. One way to do this is to parse "database show fam" response. Is there something smarter ? Something like ${DBKEYS(fam)} which would evaluate to "key1
2001 Aug 28
1
Suggested change to documentation
Its not clear from the documentation whether one should do \keyword[key1, key2} or \keyword{key1} \keyword{key2} in .Rd files. I believe the latter is correct. (At least 'R CMD check' complains when given the first version.) It would help to make this explicit in the R extension writing docs. Tim -- Timothy H. Keitt Department of Ecology and Evolution State University of New
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 Dec 12
1
possible bug in yumrepo type ?
Hello, I used to have something like this: yumrepo { "foobar": [...] gpgkey => ["file:///etc/pki/rpm-gpg/key1", "file:///etc/pki/rpm-gpg/key2"], } Which as expected used to generate files looking like this: [foobar] gpgkey=file:///etc/pki/rpm-gpg/key1 file:///etc/pki/rpm-gpg/key2 It appears this no longer works with 0.24.6. I''m pretty sure it
2009 Jul 25
1
Ordering of key offers with "ssh -i"
Hi Is it expected behaviour that when using "ssh -i", the key specified in the "-i" option is only sent to the server *after* trying all other keys in ~/.ssh ? I couldn't find anything about this in the manual, and it seems like surprising behaviour to me. It can be the cause of unexpected failures in some cases, if a server has MaxAuthTries set to a value which is
2009 May 22
3
Parsing Asterisk's .conf files from Perl, Java or PHP file
Hi, To a large extend, Asterisk's /etc/asterisk/*.conf configuration files conform to a format such as: [section1] key1=value1 key2=value2 [section2] key1=value1 key2=value2 ... To increase coherence when running custom-made application in Perl, Java, PHP, ...) and Asterisk on the same platform, I'm wondering if could extend a bit Asterisk's config files instead of duplicating data
2015 Dec 03
1
Re: RFC: arbitrary parameters for add_drive
On Thursday 03 December 2015 11:52:14 Richard W.M. Jones wrote: > On Wed, Dec 02, 2015 at 02:10:52PM +0100, Pino Toscano wrote: > > Hi, > > > > one of the bugs we have (#1092583) is about the lack of query string > > for http/https URLs: there were patches about that (not merged yet), > > whose solution was to add a new optional argument "querystring".
2011 Sep 01
1
Background fill and border for a legend in dotplot
Dear R help group I've been working on this plot for a while now and now getting around to the minor adjusments. I would like to be able to put a border and background fill around the legend in this plot. I understand the legend 'bty' should do this have this capablity but not sure how the syntax works in this case ###### initalise library("lattice")