search for: ordervector1

Displaying 14 results from an estimated 14 matches for "ordervector1".

2019 Jan 21
0
orderVector1 (sort.c): Tiny improvement concerning nalast
Dear Sir, In the functions orderVector1, orderVector1l (R-3.5.2/src/main/sort.c) there are two loops concerning nalast (lines 1096, 1105). I am not sure about the possibility of redefining them, so this function should be a little faster. The first one (line 1096) can be included in the previous 'switch' block (line 1079) (see...
2008 Oct 07
4
sort a list?
I am trying to sort a list and the data is obiously not in the right format. I am trying: x <- list() x[["A"]] <- 1 x[["B"]] <- 2 order(x) But am getting: Error in order(x) : unimplemented type 'list' in 'orderVector1' How should I change the list so that it can be sorted? What kinds of objects (classes of objects) can be sorted? Thank you. Kevin
2008 Sep 22
4
sort a data matrix by all the values and keep the names
...,6),x3=c(8,2)): x1 x2 x3 1 4 8 7 6 2 I want to sort the whole data and get this: x1 1 x3 2 x2 4 x2 6 x1 7 x3 8 If I do sort(X), R reports: Error in order(list(x1 = c(1, 7), x2 = c(4, 6), x3 = c(8, 2)), decreasing = FALSE) : unimplemented type 'list' in 'orderVector1' The only way I can sort all the data is by converting it to a matrix: > sort(as.matrix(x)) [1] 1 2 4 6 7 8 But now I lost all the names attributes. Is it possible to sort a data frame and keep all the names? Thanks! Zhihua Li ___________________________________________________________...
2008 Feb 21
2
Unable to create/index a zoo irregular timeseries
...o(matrix(pressione[,2:3],ncol=2), miedate) > ts Error in Ops.POSIXt(freq, d) : * not defined for "POSIXt" objects > ts<- zoo(matrix(pressione[,2:3],ncol=2), miedate) Error in order(x, ..., na.last = na.last, decreasing = decreasing) : unimplemented type 'list' in 'orderVector1' In addition: Warning message: In zoo(matrix(pressione[, 2:3], ncol = 2), miedate) : some methods for "zoo" objects do not work if the index entries in 'order.by' are not unique > Please help Ciao Vittorio
2020 May 18
2
order function called on a data.frame?
...er, df). On Mon, May 18, 2020 at 8:32 AM Rui Barradas <ruipbarradas at sapo.pt> wrote: > > Hello, > > There is a result with lists? I am getting > > > order(list(letters, 1:26)) > #Error in order(list(letters, 1:26)) : > # unimplemented type 'list' in 'orderVector1' > > order(data.frame(letters, 1:26)) > # [1] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 > #[22] 48 49 50 51 52 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 > #[43] 17 18 19 20 21 22 23 24 25 26 > > > And I agree that order with data.frames should...
2006 May 08
1
Help on zoo and datetime series
...;", na.strings="-999", header=TRUE) q <- zoo(z$PM10, strptime(as.character(z$Giorno),"%Y-%m-%d %H:%M")) At this point this error message appears: Errore in order(x, ..., na.last = na.last, decreasing = decreasing) : tipo 'list' non implementato in 'orderVector1' I can't understand how can I import such a file. Is there anybody who can help me? Thanks Domenico [[alternative HTML version deleted]]
2008 Nov 13
1
Error in Quantile function
..., not even sure what the error is telling me. > spread <- expntl.dr(plot_k_list,pdose) > exp_CIs <- quantile(spread,probs=c(0.01,0.05,0.95,0.99)) Error in order(list(bootdataframe.age = c(1.56064428047387e-09, 1.63862234892065e-09, : unimplemented type 'list' in 'orderVector1' > I am not sure if this is problem with the quantile command trying to order the data or if the values in the spread are too close together. Thank you for any assistance you can offer. Mark -- View this message in context: http://www.nabble.com/Error-in-Quantile-function-tp20488954p204...
2020 May 17
2
order function called on a data.frame?
Hi, base::order main input arguments are defined as: a sequence of numeric, complex, character or logical vectors, all of the same length, or a classed R object When passing a list or a data.frame, the resuts seems to be a bit useless. Shouldn't that raise an error, or at least warning? Best Regards, Jan Gorecki
2006 Jun 27
1
order() (PR#9039)
...5 month 12 day 20 svn rev 36812 language R An example demonstrating the problem: x <- rep(2:1, c(2, 2)) + 1i*c(4, 1, 2, 3) > x [1] 2+4i 2+1i 1+2i 1+3i > order(x) Error in order(x) : unimplemented type 'complex' in 'orderVector1' However sort() works with complex arguments > sort(x) [1] 1+2i 1+3i 2+1i 2+4i The problem can be worked around either by > order(Re(x), Im(x)) [1] 3 4 2 1 or, because order() allows subsequent arguments to be complex, by using a constant vector for the first argument > order(nume...
2020 May 18
0
order function called on a data.frame?
Hello, There is a result with lists? I am getting order(list(letters, 1:26)) #Error in order(list(letters, 1:26)) : # unimplemented type 'list' in 'orderVector1' order(data.frame(letters, 1:26)) # [1] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 #[22] 48 49 50 51 52 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #[43] 17 18 19 20 21 22 23 24 25 26 And I agree that order with data.frames should give a warning. The result is indeed...
2020 May 18
0
order function called on a data.frame?
...Barradas <ruipbarradas at sapo.pt> wrote: > > > > Hello, > > > > There is a result with lists? I am getting > > > > > > order(list(letters, 1:26)) > > #Error in order(list(letters, 1:26)) : > > # unimplemented type 'list' in 'orderVector1' > > > > order(data.frame(letters, 1:26)) > > # [1] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 > > #[22] 48 49 50 51 52 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 > > #[43] 17 18 19 20 21 22 23 24 25 26 > > > > > > And I a...
2003 Jun 07
2
Ordering long vectors
I need to order a long vector of integers with rather few unique values. This is very slow: > x <- sample(rep(c(1:10), 50000)) > system.time(ord <- order(x)) [1] 189.18 0.09 190.48 0.00 0.00 But with no ties > y <- sample(500000) > system.time(ord1 <- order(y)) [1] 1.18 0.00 1.18 0.00 0.00 it is very fast! This gave me the following idea: Since I don't care
2008 Aug 23
0
Error message in termplot
Hi I am trying to plot the following gam with termplot but keep getting the error message: Error in order(xx) : unimplemented type 'list' in 'orderVector1' Is there anyway I can rectify this to get my parametric coefficients plotted? Thanks Will Family: binomial Link function: logit Formula: fgha$pa ~ s(fgha$wspd) + fgha$depth + fgha$slha + fgha$hooks + wspd:hooks + wspd:hooks:depth Parametric coefficients:...
2009 Sep 30
2
R 2.9.2 crashes when sorting latin1-encoded strings
Hi everyone! I think I stumbled over a bug in the latest R 2.9.2 patched for OS X: > R version 2.9.2 Patched (2009-09-24 r49861) > i386-apple-darwin9.8.0 When I try to sort latin1-encoded character vectors, R sometimes crashes with a segmentation fault. I'm running OS X 10.5.8 and have observed this behaviour both with the i386 and x86_64 builds, in the R.app GUI as well as on