Search Results

Search found 174 results on 7 pages for 'reorder'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • stats::reorder vs Hmisc::reorder

    - by learnr
    I am trying to get around the strange overlap of stats::reorder vs Hmisc::reorder. Without Hmisc loaded I get the result I want, i.e. an unordered factor: > with(InsectSprays, reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F attr(,"scores") A B C D E F 14.0 16.5 1.5 5.0 3.0 15.0 Levels: C E D A F B Now after loading Hmisc the result is an ordered factor: > library(Hmisc) Loading required package: survival Loading required package: splines Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > with(InsectSprays, reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F Levels: C < E < D < A < F < B In calling stats::reorder directly, I now for some reason get an ordered factor. > with(InsectSprays, stats::reorder(spray, count, median)) [1] A A A A A A A A A A A A B B B B B B B B B B B B C C C C C C C C C C C C D D [39] D D D D D D D D D D E E E E E E E E E E E E F F F F F F F F F F F F Levels: C < E < D < A < F < B Specifying, that I would need an unordered factor results in an error suggesting that stats::reorder is not used? > with(InsectSprays, stats::reorder(spray, count, median, order = FALSE)) Error in FUN(X[[1L]], ...) : unused argument(s) (order = FALSE) So the question really is how do I get an unordered factor with Hmisc loaded?

    Read the article

  • reorder NSArray in objective-c

    - by Jonathan
    I have an NSArray of JSON file locations. There are stored in the user's/app's Document directory and inside each JSON file is a name value. I'm able to retreive the data from JSON files, I don't need help with tht. But I need help on sorting NSArrays I have no idea how I can do that based on a value inside the file, while not being pathetically slow. This is on the iPhone btw. In sum how do I customly reorder NSArrays.

    Read the article

  • R: How can I reorder the rows of a matrix, data.frame or vector according to another one.

    - by John
    test1 <- as.matrix(c(1, 2, 3, 4, 5)) row.names(test1) <- c("a", "b", "c", "d", "e") test2 <- as.matrix(c(6, 7, 8, 9, 10)) row.names(test2) <- c("e", "d", "c", "b", "a") test1 [,1] a 1 d 2 c 3 b 4 e 5 test2 [,1] e 6 d 7 c 8 b 9 a 10 How can I reorder test2 so that the rows are in the same order as test1? e.g: test2 [,1] a 10 d 7 c 8 b 9 e 6 I tried to use the reorder function with: reorder (test1, test2) but I could not figure out the correct syntax. I see that reorder takes a vector, and I'm here using a matrix. My real data has one character vector and another as a data.frame. I figured that the data structure would not matter too much for this example above, I just need help with the syntax and can adapt it to my real problem.

    Read the article

  • Should I reorder partitions regarding performance

    - by Marcel
    I have in principal 3 big partitions on my Netbook. One Windows, one for shared files, one for Ubuntu. I recently find out (using hdparm) the the hardisk seems to have much better perfomance on the first 2/3 (~ 60MB/s) than on the last 1/3 (~ 40MB/s). I am thinking to delete the second partition and create new partitions for "swap" and / directly after Windows. Does this effort make sense? I also wanna upgrade to 10.4/10.10 but keep the option to go back to the old system, so maybe I install ubuntu completely in a/this new partition?

    Read the article

  • What does reorder() function do in Joomla?

    - by Parth
    What does reorder() function do in Joomla? I have a statement for a function of menu "copy" in administrator code for menu as: $curr->reorder( 'menutype = '.$this->_db->Quote($curr->menutype).' AND parent = '.(int) $curr->parent ); as i Have executed this code it has reordered my id to any other position.. I just need to know is this reorder() function a inbuilt function of joomla? If yes, WHat and how does it do what he has done it to my ids ? :( I am Newbie to Joomla PLs help EDIT How can i get the the reordered output just after calling the function?

    Read the article

  • Script to reorder ACLs in Windows server 2008?

    - by zimdawg
    I have ran a tool called admnalow.exe that re-grants access to the local administrators (BUILTIN\Administrators) group for all directories and subdirectories in a given path. The problem is it seems to have caused the ACL's to be ordered improperly. I've been looking everywhere and have been unable to find a .vbs or any other script that will parse through a set of directories and reorder the ACLs. This can be done manually but would be incomprehensible for thousands of directories. Can anyone help?!?!

    Read the article

  • How can you manually reorder a ListView in Android?

    - by groomsy
    I have a ListView in Android that needs to have the ability to be manually reordered. An example would be within Android's Music Player application, when you can change the order of tracks in a playlist. I know how to programmatically change the order of a ListView, but not how to do it in regards to a touch and slide approach that can be found in the Music Player application. Thanks in advance, groomsy.

    Read the article

  • Reorder inputs before submiting form

    - by Jason
    Is there any way to reorder or manipulate a set of inputs before posting to a script for processing? I'm able to reorder the elements in the DOM no problem, but getting this to happen after the user presses the submit button and before the browser makes the POST is a bit tricky. I'm using the ajaxForm plugin in jQuery. There is a beforeSubmit callback, but this doesn't seem to allow me to reorded the inputs.

    Read the article

  • Catch PyGTK TreeView reorder

    - by mkotechno
    I have a simple gtk.TreeView with a gtk.ListStore model and set_reorderable(True), I want to catch the signal/event emited when the user reorder through drag&drop the list, but the documentation does not help much: "The application can listen to these changes by connecting to the model's signals" So I tried to connect the model (ListStore) signals... but surprise! ListStore has no signals, so you are dispatched to TreeModel signals, then I tried to connect with the TreeModel "rows-reordered" signal with no lucky. How should I catch the list reorder performed by the user?

    Read the article

  • Reorder cells in a UITableView without displaying a "delete" button

    - by iter
    I want to be able to reorder cells in a table, but not to delete or insert them. I want a picture like this: This image appears in Apple's Table View Programming Guige, but the code samples there produce a table with red "delete" buttons when the table goes into editing mode. I can set editingStyleForRowAtIndexPath to UITableViewCellEditingStyleNone and that makes the delete buttons go away, but the rows are still indented as if to make room for these buttons.

    Read the article

  • Resort (reorder) table data

    - by Dave Jarvis
    What is the fastest way to reorder (resort) a table? In MySQL, you can do: CREATE TABLE table2 LIKE table1; INSERT INTO table2 SELECT * FROM table1 ORDER BY by name; DROP TABLE table1; RENAME TABLE table2 TO table1; What about PostgreSQL? Is there a faster way?

    Read the article

  • How can I reorder parts of a video file

    - by sandeep
    I have download a mkv movie file which gave me 3 files suffixed .001, .002, and .003. When i join them together with different tools like winrar, 7zip, hjsplit, concatenated file shows only last 40 min/1.22 hrs of the total length of the movie. If I play all the (.001, .002, .003) parts with vlc player, I can see that .003 is the first part of the video and .001 is the last part. Can anyone tell me how can join this parts of movie with correct position or how I can convert .003 file into .001 file.

    Read the article

  • Reorder a multidimensional array?

    - by JasonS
    I have the following array, I need to reorder it by average rating descending. Here is a snippet. Any idea how I would go about doing this? Thanks Array ( [0] => Array ( [id] => 3 [name] => [rating] => 0 ) [1] => Array ( [id] => 2 [name] => [rating] => 2 ) )

    Read the article

  • Does JavaME and/or Proguard reorder assignments?

    - by chrisdew
    This is a simplified example - I have two threads: Can JavaME and/Proguard ever reorder the obX = ... statements, such that thread_B will have a null pointer exception at ob2.someMethod? thread_A: Object ob1 = null; Object ob2 = null; ... ob1 = something1; ob2 = something2; thread_B: if (ob2 != null) { ob1.someMethod(); ... } P.S. I do realise that synchronising these will avoid the issue. Synchronisation has both a performance overhead, and more importantly, a chance to introduce deadlock.

    Read the article

  • How can I reorder columns in a DataGridView?

    - by Luiscencio
    so I fill my DGV with some data and set some columns invisible: var part = inventory.espiromex_product.Where(p => p.descriptionsmall == cmbMainP.Text).First().partnumberp; dtgAssy.DataSource = inventory.espiromex_productsub.Where(p => p.partnumberp == part); dtgAssy.Columns["idproductsub"].Visible = false; dtgAssy.Columns["partnumberp"].Visible = false; dtgAssy.Columns["partnumbersubp"].Visible = true; dtgAssy.Columns["quantity"].Visible = true; dtgAssy.Columns["comments"].Visible = true; dtgAssy.Columns["assemblyno"].Visible = false; dtgAssy.Columns["assemblynodesc"].Visible = false; dtgAssy.Columns["uomid"].Visible = true; dtgAssy.Columns["subassemblylevelnumber"].Visible = false; dtgAssy.Columns["scrappercent"].Visible = true; this is just fine but columns are sorted Alphabetically, How can I reorder columns programmatically? note that inventory is an Entitie and I am using Linq to Entities.

    Read the article

  • reorder list elements - jQuery?

    - by Alex
    Hello, I am experimenting with jQuery lately, and I was wondering if it's possible with js or pure jquery to reorder <li> elements. So if I have a silly list like the following: <ul> <li>Foo</li> <li>Bar</li> <li>Cheese</li> </ul> How would I move the list elements around? Like put the list element with Cheese before the list element with Foo or move Foo to after Bar. So is it possible? If so, how? Thanks!!

    Read the article

  • Can't Reorder a UITableViewCell into _some_ empty sections of a UITableView

    - by Jeremy Lightsmith
    If I have a UITableView in edit mode, w/ reordering turned on, it seems I can't move some (but not all) cells into some (but not all) empty sections. For example, if I have this layout : Section 1 apple banana Section 2 doberman Section 3 Section 4 Then I can move 'doberman' into any slot in section 1 (except after 'banana'), but I can't move it into section 3 or 4 at all. On the other hand, I can move 'apple' & 'banana' into section section 2 (except after 'doberman'), and I CAN move it into section 3, but NOT into section 4. What gives? this seems like buggy behavior. How do people work around it? Is apple aware of this bug?

    Read the article

  • How can I reorder an mbox file chronologically?

    - by Joshxtothe4
    Hello, I have a single spool mbox file that was created with evolution, containing a selection of emails that I wish to print. My problem is that the emails are not placed into the mbox file chronologically. I would like to know the best way to place order the files from first to last using bash, perl or python. I would like to oder by received for files addressed to me, and sent for files sent by me. Would it perhaps be easier to use maildir files or such? The emails currently exist in the format: From [email protected] Fri Aug 12 09:34:09 2005 Message-ID: <[email protected]> Date: Fri, 12 Aug 2005 09:34:09 +0900 From: me <[email protected]> User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: someone <[email protected]> Subject: Re: (no subject) References: <[email protected]> In-Reply-To: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Status: RO X-Status: X-Keywords: X-UID: 371 X-Evolution-Source: imap://[email protected]/ X-Evolution: 00000002-0010 Hey the actual content of the email someone wrote: > lines of quotedtext I am wondering if there is a way to use this information to easily reorganize the file, perhaps with perl or such.

    Read the article

  • extract/slice/reorder lists in (emacs) lisp?

    - by Stephen
    In python, you might do something like i = (0, 3, 2) x = [x+1 for x in range(0,5)] operator.itemgetter(*i)(x) to get (1, 4, 3). In (emacs) lisp, I wrote this function called extract which does something similar, (defun extract (elems seq) (mapcar (lambda (x) (nth x seq)) elems)) (extract '(0 3 2) (number-sequence 1 5)) but I feel like there should be something built in? All I know is first, last, rest, nth, car, cdr... What's the way to go? ~ Thanks in advance ~

    Read the article

  • reorder XML elements or set an explicit template with XSLT

    - by Sash
    I tried the solution in my previous question (flattening XML to load via SSIS package), however this isn't working. I now know what I need to do, however I need some guidance on how to do it. So say I have the following XML structure: <person id="1"> <name>John</name> <surname>Smith</surname> <age>25</age> <comment> <comment_id>1</comment_id> <comment_text>Hello</comment_text> </comment> <comment> <comment_id>2</comment_id> <comment_text>Hello again!</comment_text> </comment> <somethingelse> <id>1</id> </somethingelse> <comment> <comment_id>3</comment_id> <comment_text>Third Item</comment_text> </comment> </person> <person id="2"> <name>John</name> <surname>Smith</surname> <age>25</age> <somethingelse> <id>1</id> </somethingelse> </person> ... ... If I am to load this into a SSIS package, as an XML source, what I will essentially get is a table created for each element, as opposed to get a structured table output such as person table (name, surname, age) somethingelse table (id) comment table (comment_id, comment_text) What I end up getting is: person table (person_Id <-- internal SSIS id) name table surname table age table person_name table person_surname table person_comment_comment_id table etc... What I found was that if each element and all inner elements are not in the same format and consistency, i will get the above anomaly which makes it rather complex especially if I am dealing with 80 - 100+ columns. Unfortunately I have no way of modifying the system (Lotus Notes) that produces these reports, so I was wondering whether I may be able to explicitly have an XSLT template that will be able to align each person sub elements (and the sub collection elements such as comments ? Unless there is a quicker way to realign all inner elements. Seems that SSIS XML source requires a very consistent XML file in the sense of: if the name element is in position 1, then all subsequent name elements within person parent have to be in position 1. SSIS seems to pickup the inconsistencies if there are certain elements missing from one parent to another, however, if their ordering is not right (A, B, C)(A, B, C)(A,C,B), it will chuck a massive fuss! All help is appreciated! Thank you in advance.

    Read the article

  • How to reorder type members with Resharper?

    - by AngryHacker
    Typical scenario: a class that a lot of people have worked on. I'd like to sort methods, properties, etc... in alphabetical order. I'd like to be able to do this within the region or globally in the class. I see the feature in Resharper to do it, but it does not seem to do anything.

    Read the article

  • How to reorder table rows (drag-and-drop) along with their sub rows

    - by Eirik Johansen
    I have a table which looks like this (simplified for the example): <table> <tr class="lvl_1"> <td> Level 1 </td> </tr> <tr class="lvl_2"> <td> Level 2 </td> </tr> <tr class="lvl_3"> <td> Level 3 </td> </tr> <tr class="lvl_1"> <td> Level 1 </td> </tr> <tr class="lvl_2"> <td> Level 2 </td> </tr> <tr class="lvl_3"> <td> Level 3 </td> </tr> The content in the rows with the lvl_3 class are children of the previous lvl_2 row, and the lvl_2 rows are children of the previous lvl_1. Had the data been a list, it would have looked something like this: Level 1 -- Level 2 ---- Level 3 Level 1 -- Level 2 ---- Level 3 I'm not looking to implement drag-and-drop sorting functionality, make it possible to rearrange the level 1 and two rows. The tricky part is that once I start moving a row, the corresponding children (and grand-children, if any) should move along with it. Is this even possible with the current markup, or do I have to rearrange the code? Thanks in advance !

    Read the article

1 2 3 4 5 6 7  | Next Page >