Displaying 20 results from an estimated 434 matches for "1's".
2006 Jan 11
2
a series of 1's and -1's
Does anyone know of a simple test
in any R package that given
a series of negative ones and positive
ones ( no other values are possible in the series )
returns a test of whether the series is random or not.
( a test at each point would be good but
I can use the apply function to implement
that ) ?
thanks.
2006 Jan 12
1
I think not so hard question
I'm sorry to bother this list so much
But I haven't programmed in
A while and I'm struggling.
I have a vector in R of 1's and -1's
And I want to use a streak of size Y
To predict that the same value will
Be next.
So, suppose Y = 3. Then, if there is a streak of three
ones in a row, then I will predict that the next value is
a 1. But, if there is a streak of 3 -1's in a row,
then I will predict that a...
2009 Jun 12
2
Creating this vector, any suggetions?
Suppose I have the first vector: c(1, 6, 8, 9)
I will like to create a second vector of size 10 composed of 0 and 1's. The
second vector will be composed of four 1's and six 0's. The position of the
1's will be specificed by the first vector. So essentially, I want a second
vector in the form:
c(1, 0, 0, 0, 0, 1, 0,...
2006 Nov 10
4
Selective subsetting
Hi all,
Here's an interesting (for me, at least!) problem I came across:
I have a correlation matrix, let's say with 6 variables, A to F, as column
headings and the same 6 as row headings.
The matrix is filled with correlation coefficients. Therefore, the diagonal
is all 1's, and each of the two triangles formed by the diagonal has the
same 15 correlation coefficients.
I need to extract these 15 coefficients from this. I don't want the 1's and
I don't want redundant values.
I tried converting the matrix to a list, using c(m) and then I'm stuck.
Do...
2008 Sep 17
2
modifying patterns in a matrix
Dear R-users,
I have some very simple data where 1's represent events and zeroes non-events, e.g.
temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0))
For each row in the matrix, I would like to replace a singelton event by a 0. That is, any 1 surrounded by zeroes (010) should be replaced by a zero (000). Sequences of 1's should be lef...
2010 May 30
1
Count the number of consecutive 1's
Hi All,
We have a raw dataset that, on the sampling time column, for example:
t <- c(0,1,2,5,0,5,0,2,5)
And we need to create a second column that indicates the day of the sampling, so the end result of what we want is a vector:
1,1,1,1,2,2,3,3,3
Additional information that might simplify the matter is that, for each day, the time starts with zero and ends with 5.
I am a beginner with...
2009 Jan 06
4
Apparant bug in binomial model in GLM (PR#13434)
Full_Name: S?ren Faurby
Version: 2.4.1 and 2.7.2
OS:
Submission from: (NULL) (192.38.46.92)
There appear to be a bug in the estimation of significance in the binomial model
in GLM. This bug apparently appears when the correlation between two variables
is to strong.
Such as this dummy example
c(0,0,0,0,0,1,1,1,1,1)->a
a->b
m1&l...
2008 Mar 04
1
Sampling letters
I have a binary matrix of size N x 300. I then create the following:
> set.seed(1234)
> (key_file <- sample(letters[1:4], 300, replace=TRUE))
[1] "a" "c" "c" "c" "d" "c" "a" "a" "c" "c" "c" "c" "b" "d" "b" "d"
&qu...
2006 Oct 19
2
randomize a matrix
Hello everyone,
If I have an incidence matrix of 0 and 1's
P=[1 1 1 1 1 1
1 1 1 1 0 0
1 1 1 0 0 0
1 1 1 0 0 0
1 1 0 0 0 0]
I want to create a new uniform random matrix [a] that is filled with 0's
and 1's but constrained so that the row and column sums are the same as
in [P]. Does anyone know how to accomplish this?
Thanks in...
2005 Oct 17
4
Delayed ringing on some SIP phones
...s on two floors. They have an agreement between them whereby they'll
answer each other's incoming calls and take messages if the office is empty
/ everyone is on the phone.
Each of them has an ISDN BRI delivered to asterisk via zaphfc, then dropped
into a context as follows:
exten => s,1,SetCIDName(Company 1)
exten => s,2,Dial(SIP/200&SIP/201&etc.,30)
exten => s,3,Voicemail(su200)
Each company is able to see on the LCD on their SIP phones whether the call
is for them or the folks up/downstairs.
What I'd like to do is implement a delayed ringing strategy - i.e. i...
2008 Jun 13
6
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
...ath set to false and using an unordered compare. Could someone
look into this?
While I'm at it, is there any reason why only the most significant bit of
the return value of VFCmp is defined (according to the documentation)? Both
AltiVec and SSE set the components of the result to either all 1's or all
0's. Having only the most significant bit doesn't seem useful to me at all,
and (arithmetic) shifting vectors to replicate the bit isn't supported.
Thanks!
Nicolas Capens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lis...
2012 Sep 03
1
Time Series filter help?
I have a time series data with 1's and 0's. When the last 3 observations
are 1 I want to generate a 1 until I have three 0's in a row and then I want
it to produce all zeros again. For example if I have 0101010101 for the
first part of the time series this would produce all zeros. Then if the
data has 111 my functi...
2008 Jun 17
2
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
Hi Nate!
I don't see how that would work. Select doesn't work per element.
Say we're trying to vectorize the following C++ code:
if(v[0] < 0) v[0] += 1.0f;
if(v[1] < 0) v[1] += 1.0f;
if(v[2] < 0) v[2] += 1.0f;
if(v[3] < 0) v[3] += 1.0f;
With SSE assembly this would be as simple as:
movaps xmm1, xmm0 // v in xmm0
cmpltps xmm1, zero // zero = {0.0f, 0.0f, 0.0f, 0.0f}
andps xmm1, one // one = {1.0f, 1.0f, 1.0f...
2007 Nov 20
1
Problem with code for bootstrapping chi square test with count data
Hi,
I'd like some advice on bootstrapping in R.
I have a species x with 20 individuals and a factor containing 0 and 1's
(in this case 5 zeros and 15 ones). I want to compare the frequency of
the occurrence of 1 with a probability value. This code seems to work to
do this in R.
attach(test)
p <- c(0.5272, (1-0.5272))
sp1_1 <- length(subset(x, x==1))
sp1_0 <- length(subset(x, x==0))
obs1_1 <- c(sp1_...
2009 Aug 17
4
vector replacement 1/0 to P/A
Hi,
Can someone suggest an efficient way to substitute a vector/matrix
which contains 1's and 0's to P's and A's (resp.)?
Thanks,
Lana
2002 Oct 29
5
People
Is there a way to map NT names to UNIX names when they are not the same. 95%
of our are which is great but we have a few that are different. For example,
we have NT user "bigboy" who's Unix account is "smallboy", how can I make an
association, oh learned 1's.
Thanks,
Jon :-)
agere systems
Office 651-675-3064* 1230 Northland DriveF
Cell Phone 651-253-3703 Mendota, MN 55120
mailto: rend@agere.com *
-------------- next part --------------
HTML attachment scrubbed and removed
2005 Oct 25
3
making an inicator variable
Hello,
I am almost a total novice, and I am sure there must be an easy (and
basic) way to turn a variable of 1's and 2's into a variable of zeros
and ones. This is in a data frame, but if I could do it with vectors,
that's all I need.
Can someone tell me how?
Thanks so much,
Jen
2006 Jan 26
2
Data management problem: convert text string to matrix of 0's and 1's
...eir are
8 possible behaviors, coded as "i" "c" "s" "r" "v" "e" "p" "f".
The data looks like:
-->
icsrvepf
fpevrsci
ics
p
f
ic
<--
I would like to convert the about to a matrix of the form:
i c s r v e p f
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0
Thanks.
Dale
Dale Steele, MD
Pediatric Emergency Medicine
Brown Medical School
2012 Nov 21
5
Creating a frequency table for binomial varaible
Hello,
I have simulated 30 observations from a binomial(5,0.1) distribution.
Now I need to make frequency table( that means I need to tally how many 0's
, 1's 2's....... 5's)
I know that the simple R function table() will do this, but I am afraid
that some times I may get zero frequency for some particular values (for
example in the above t...
2018 Apr 21
2
Check if row of dataframe is superset of any row in another dataframe.
Hi,
I am looking for a way in which I can check if rows in 1 dataframe are
present in another data frame in a unique way. A row in dataframe should be
super set of any row in another dataframe.
I can write a for loop for it, however, that will be inefficient. So, I am
looking for an efficient way to do this in R.
I have explained it with an example below:...