Displaying 20 results from an estimated 7000 matches similar to: "Discover significant change in sorted vector"
2009 Apr 07
4
group by-like statement for 2-row matrix
Hi,
my problem is as follows:
I have a matrix of two rows like this:
2 2 3 4 4 4 5 5 6
1 1 2 1 3 3 2 1 1
Can I apply something like "group by" in sql? What I want to achieve
is the some of second row for each unique entry of first row:
2 -> 2 (=1+1)
3 -> 2
4 -> 7 (=1+3+3)
5 -> 3 (=2+1)
6 -> 1
Thanks!!
Henning
2009 Jun 28
1
testing an ARFIMA model for structural breaks with unknown breakpoint
Dear R users,
I'm trying to use the "strucchange" package to determine structural breaks
in an ARFIMA model.
Unfortunately I'm not so familiar with this topic (and worse, I'm a beginner
in R), so I don't know exactly how to specify my model so that the
"Fstats","sctest" and "breakpoint" functions to recognize it and to
calculate the
2011 Dec 30
3
Break Points
Respected Sir
I tried the strucchange
My data is attached. However I tried the attached commands (last
save.txt) to perform Bai Perron 2003... I t worked well but in the end
it is giving warning that overlapping confidence interval... I am not
sure how to proceed... Please Help Me
Thanking You
Ayanendu Sanyal
--
Please have a look at our new mission and contribute into it (cut and
paste the
2011 Sep 21
1
Strucchange gbreakpoints
Hi,
I am a new user to R.
I am using strucchange to generate breakpoints:
--------------------------------------------------------------------------------------
> res <- gbreakpoints(GDP.new ~ 1,data=a,h=2,breaks=5)
> print(res)
Optimal 6-segment partition for `lm' fit:
Call:
gbreakpoints(formula = GDP.new ~ 1, data = a, h = 2, breaks = 5)
Breakpoints at observation number:
2011 Sep 14
1
Strucchange generating breakpoints
Hi,
I am new to R. I am using strucchange to get the breakpoints in time series
dataset. So the problem I am facing is: I want to link the result generated
by the breakpoints to further analysis (for eg. generating volatility for
each group). The result is in following form:
---------------------------------------
> res <- gbreakpoints(GDP.new ~ 1,data=a,h=2,breaks=6)
> res
2011 Mar 16
1
Discover held channel?
Hi,
Here is a scenario:
1) A call comes in on an outside line on a DAHDI device
2) The call is answered by a SIP extension (Linksys SPA942 to be exact)
3) The SIP extension places the outside call on hold
4) The same SIP extension dials another extension.
Is it possible for the dialplan in step 4 to discover the channel of the
call placed on hold in step 3? In other words, since it is the
2016 Aug 25
1
sort.int(c(2, NA, 4), index.return=TRUE, na.last=NA, method)$ix differ for method="radix" and "shell"/"quick" (+ new default in R-devel)
Does sort.int(c(2,NA,4), index.return=TRUE, na.last=NA,
method="radix")$ix give the intended result, because I get:
> sort.int(c(2,NA,4), index.return=TRUE, na.last=NA, method="radix")
$x
[1] 2 4
$ix
[1] 1 3
With method="shell" and method="quick" in R devel, I get:
> sort.int(c(2,NA,4), index.return=TRUE, na.last=NA, method="shell")
$x
2004 Nov 23
2
sorting without order
Hello,
In order to increase the performance of a script I'd like to sort very large vectors containing repeated integer values.
I'm not interesting in having the values sorted, but only grouped.
I also need the equivalent of index.return from the standard "sort" function:
f(c(10,1,10,100,1,10))
=>
grouped: c(10,10,10,1,1,100)
ix: c(1,3,6,2,5,4)
is there a way
2018 May 23
3
find the permutation function of a sorting
> sort(c("bc","ac","dd"), index.return=TRUE)
$x
[1] "ac" "bc" "dd"
$ix
[1] 2 1 3
We have the permutation, namely 1-->2, 2-->1, 3-->3.
How can I apply the permutation function to a new set
c("D","E", "F")?
so that the result is
c("E","D", "F").
2018-05-23 11:06
2018 May 23
3
find the permutation function of a sorting
Thanks, David.
I got the answer from the web.
Is there any easy way to permute a set (e.g., a set of characters) by the
permutation it returns? Thanks,
> x <- c(10,7,4,3,8,2)
> sort(x, index.return=TRUE)
$x
[1] 2 3 4 7 8 10
$ix
[1] 6 4 3 2 5 1
2018-05-23 10:49 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>
> > On May 22, 2018, at 10:06 PM, John
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
>
> Thanks, David.
> I got the answer from the web.
> Is there any easy way to permute a set (e.g., a set of characters) by the permutation it returns? Thanks,
>
>
> > x <- c(10,7,4,3,8,2)
> > sort(x, index.return=TRUE)
> $x
> [1] 2 3 4 7 8 10
>
> $ix
> [1] 6 4 3 2
2018 May 23
0
find the permutation function of a sorting
Hello,
Like David said, what you are trying to do with sort() can be done with
order() in a much easier way.
First, your code
x <- sort(c("bc","ac","dd"), index.return=TRUE)
Now, with function order()
i <- order(c("bc", "ac", "dd"))
y <- c("D","E", "F")[i]
y
#[1] "E" "D"
2008 Feb 12
3
sort a data frame according to roman characters
R-help,
I have a data frame with one column containing roman numbers
The data are not sorted as : I II III IV V VI VII VIII IX
X XI XII XIII XIV XV
Using data[order(data$Roman),] does not do the job.
How can this be done?
Thanks in advance.
2004 Nov 03
2
Unexpected results from sort function when partial and index are used
Hi,
Consider the following example:
sort(10:1, partial=3)
## 1 2 3 7 6 5 4 8 9 10
sort(10:1, index=T)
## $x: 1 2 3 4 5 6 7 8 9 10
## $ix: 10 9 8 7 6 5 4 3 2 1
sort(10:1, partial=3, index=T)
## 1 2 3 7 6 5 4 8 9 10
The first 2 calls gave expected returns; however, the third one did not
returned an index as requested. I could not find anything about it in
2009 Dec 08
1
Sort a data frame according to romans
R-help,
I have a data frame:
> mydata
strata nh Nh Wh fh
1 I 10 26 0.048 0.385
2 II 32 84 0.154 0.381
3 III 16 42 0.077 0.381
4 IV 4 11 0.020 0.364
5 V 10 26 0.048 0.385
7 VII 64 168 0.309 0.381
8 VIII 49 129 0.237 0.380
9 IX 22 58 0.107 0.379
91 VI 0 0 0.000 0.000
and I wish to rearrange the data are sorted according to the roman
2009 May 18
9
Concatenating two vectors into one
Dear users,
a very simple question:
Given two vectors x and y
x<-as.character(c("A","B","C","D","E","F"))
y<-as.factor(c("1","2","3","4","5","6"))
i want to combine them into a single vector z as A1, B2, C3 and so on.
z<-x*y is not working, i tried several others
2006 Dec 08
1
X using ATI ES1000: Failed to create write
I verified with my vendor that indeed we are using an ATI ES1000 Video
Card, not an Nvidia as previously thought.
I am getting the following error -any suggestions?
[38] -1 0 0x0000b400 - 0x0000b403 (0x4) IX[B]
[39] -1 0 0x0000b480 - 0x0000b487 (0x8) IX[B]
[40] -1 0 0x0000b800 - 0x0000b803 (0x4) IX[B]
[41] -1 0 0x0000b880 - 0x0000b887
2014 Nov 22
4
yum-plugin-security
Hi all,
I have difficulties to understand the output of yum-plugin-security.
I am on a X86_64 machine and when I query for security updates,
yum lists i686 packages, that I don't have installed.
--------------------
# yum check-update --security
Loaded plugins: changelog, fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.linuxwerk.com
* epel:
1999 Oct 08
1
floor(NaN) problem fixed in massdist.c (PR#291)
Full_Name: Naoki Takebayashi
Version: 0.65.0+R-release.diff (Oct 6, 1999)
OS: Linux/Alpha
Submission from: (NULL) (129.79.224.171)
This will fix the "problem 2 (crash in fft)" in Bug ID #277
On Linux/Alpha, make check failed because R could not handle the following
example in base-Ex.R
##___ Examples ___:
# The Old Faithful geyser data
data(faithful)
:
:
## Missing values:
x <-
2023 Nov 14
1
data.frame weirdness
What is going on here? In the lines ending in #### the inputs and outputs
are identical yet one gives a warning and the other does not.
a1 <- `rownames<-`(anscombe[1:3, ], NULL)
a2 <- anscombe[1:3, ]
ix <- 5:8
# input arguments to #### are identical in both cases
identical(stack(a1[ix]), stack(a2[ix]))
## [1] TRUE
identical(a1[-ix], a2[-ix])
## [1] TRUE
res1 <-