similar to: split() - unexpected sorting of results

Displaying 20 results from an estimated 10000 matches similar to: "split() - unexpected sorting of results"

2017 Oct 20
2
split() - unexpected sorting of results
Thanks, for the explanation. Still, I think this is surprising bahaviour which might be handled better. Best, Peter Am 20.10.2017 9:49 nachm. schrieb "I?aki ?car" <i.ucar86 at gmail.com>: > Hi Peter, > > 2017-10-20 21:33 GMT+02:00 Peter Meissner <retep.meissner at gmail.com>: > > Hey, > > > > I found this - for me - quite surprising and puzzling
2017 Oct 21
1
split() - unexpected sorting of results
Hello, In order to solve that problem of sorting numerics made characters there is package stringr, functions str_sort and str_order. library(stringr) set.seed(2447) x <- sample(11L) sort(as.character(x)) [1] "1" "10" "11" "2" "3" "4" "5" "6" "7" "8" "9"
2017 Oct 20
0
split() - unexpected sorting of results
Hi, On 10/20/2017 12:53 PM, Peter Meissner wrote: > Thanks, for the explanation. > > Still, I think this is surprising bahaviour which might be handled better. Maybe a little surprising, but no more than: > x <- sample(11L) > sort(x) [1] 1 2 3 4 5 6 7 8 9 10 11 > sort(as.character(x)) [1] "1" "10" "11" "2"
2017 Oct 20
0
split() - unexpected sorting of results
Hi Peter, 2017-10-20 21:33 GMT+02:00 Peter Meissner <retep.meissner at gmail.com>: > Hey, > > I found this - for me - quite surprising and puzzling behaviour of split(). > > > split(1:11, as.character(1:11)) > split(1:11, 1:11) > > > When splitting by numerics everything works as expected - sorting of input > == sorting of output -- but when using a
2019 Feb 07
1
Runnable R packages
Doesn't Rtools provide everything needed to build R packages and R on Windows - including gcc? Am Sa., 2. Feb. 2019 um 22:29 Uhr schrieb Abs Spurdle <spurdle.a at gmail.com>: > Creating an .exe file isn't necessarily difficult. > The main problems are that you have to write and compile the C (or other) > files. > Otherwise, the complexity depends on the level of Inter
2016 Jan 18
4
r-devel @ Travis
Hi! I'm developing R packages and use Travis CI for continous integration. When submitting to CRAN Im suggestet to test the package using the latest R-devel. I would like that all test where run using Travis. Is there anyone who knows if this is possible to run travis test using the latest r-devel? -- Regards M?ns ============================ M?ns Magnusson 070 - 588 97 15 mons.magnusson
2009 Jun 11
3
Matrix manipulation
Hello everyone, I have a couple of fairly simple questions (I hope) the answers to which I cannot find through the documentation at the moment. 1. I would like to delete the a row from a matrix if a certain elimination criterion is met. I am familiar with x <- x[-7,] (to remove row 7, for example). Are there any other means of removing an entire row? 2. Is there a single command that
2008 Mar 07
2
Sorting by Sender Name
Dear Timo, Posted this originally to the squirrelmail list but they said that sorting is done server side so concluded I needed to talk to you: ============= I feel there is an error in the logic of the sort by From column. If you sort by this column, the messages are re-ordered in alphabetical order using the *email address* as the sorted word. However most people these days have their
2004 Dec 24
6
Sorting problem
Hi I'm using R 2.0 in SuSE 9.2. When I plot data as a boxplot, the boxes appear on the plot in alphabetical order (of group) rather than the order in which they appear in the data. So far, the only thing I can do to fix this is to prefix the group labels with a,b,c...etc to trick R into plotting them in the right order. Can sorting be turned off? How should I address this sensibly? Thanks
2011 Dec 29
2
sorting a data.frame (df) by a vector (which is not contained in the df) - unexpected behaviour of match and factor
Dear R colleagues, consider my data.frame named "df" with 3 columns - being level, prevalence and sensitivity - and 7 rows of data (see dump below). df <- structure(list(level = structure(1:7, .Label = c("0", "1", "10", "100", "1010", "11", "110"), class = "factor"), prevalence = structure(c(4L, 2L, 3L,
2012 May 16
3
Wrong Q3 + Mean.
Hi. > a [1] 13 13 14 14 15 15 16 20 21 26 > summary(a) Min. 1st Qu. Median Mean 3rd Qu. Max. 13.0 14.0 15.0 16.7 19.0 26.0 > mean(a) [1] 16.7 > quantile(a) 0% 25% 50% 75% 100% 13 14 15 19 26 Clearly, this is not right. My Instructor and I have no idea why the program does that. I removed the program from the computer , installed it
2008 Oct 18
2
sorting matrix output alphabetically
Hello, I have been using the TM package to create a TermDocMatrix, which I have saved as a matrix so that I can view word frequencies. Below is a section of the code that I have used and an excerpt of the output: What I wanted to be able to do is to view the output alphabetically - rather than the results being sorted by frequency as below, that an alphabetical list would be generated. This
2009 Sep 02
5
pruning data
Hello everyone, I am trying to prune a data frame for partial least squares analysis. I need to delete an entire row if one cell in the row contains a NA. Presently, I am running a loop that is supposed to extract the rows that are full of numbers into a second data frame and skips the rows that contain a single NA value. I want to know if there is a simple way to determine if a row
2010 Sep 16
2
standard error of difference for mixed effects
I have a dataset relating the effects of engineering works on the level of salinity in a river before and after the works. I have modelled this using linear mixed effects models to determine if the significance and level of the response to the works. I am wanting to calculate the se of difference at several points. I am not sure of how to calculate the difference and which estimate of se I
2006 Aug 20
1
sorting with booleans
Hi i have a column in my ferret model called sponsored. It is a boolean and i want to order the results by sponsored and date registered. At the moment it is not managing to sort the booleans. I tried declaring this in my model but it seems to have had no effect. def false.<=>(o) o ? -1 : 0 end def true.<=>(o) !o ? 1 : 0 end I''m using the acts_as_ferret plugin. below
2007 Dec 31
2
USB HID - interrupt reports
Since reports received over the interrupt pipeline are a recurring problem for various types of UPS'es, I propose to simply ignore the data we receive there and only flush the respective report buffer. By doing so, at the time the interrupt reports are processed the first variable that is retreived will trigger a poll for the corresponding feature report and we should be fine. The impact on
2011 Oct 14
1
sorting dataframe by arbitrary order
This has been dogging me for a while. I've started making a lot of tables via xtable so the way I want to sort things is not always in alphabetical or numerical order. As an example, consider I have a dataframe as follows set.seed(100) a <- data.frame(V1=sample(letters[1:4],100, replace=T),V2=1:100) I know I can sort the columns first by V1 first and then by V2 by: sorted.a <-
2009 Jun 12
3
Referencing data frames
Hi, How do I use the string content of a string variable to reference a data frame of the same name? I want to do the typical tasks of 1) building a name with a string variable and using the string variable to create a data frame (or any object) whose name is the string value of the variable and 2) pass on a string to a function as a parameter, and then use that string to refer to an existing
2007 Nov 16
7
sorting factor levels by data frequency of levels
using an example from r online help > state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa", "qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas", "sa", "nt", "wa", "vic",
2009 Feb 12
3
trunc/floor a number -- strange bahaviour
Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n <- 12.357531 Then the following command: n <- (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still as expected [1] 10 === not expected, count with me: 1 - floor(1) is zero, times 10 gives 0, not 10!!!! [1] 10 === should