Displaying 20 results from an estimated 644 matches for "1s".
Did you mean:
10s
2011 Nov 21
4
Discarding a matrix based on the rowSums value
...0 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 0
[8,] 0 0 0 0 0 0 0 0 0 0
[9,] 0 0 0 0 0 0 0 0 0 0
[10,] 0 1 0 1 0 1 1 0 0 1
must be discarded.
For any N.1s <= Nrow, I am trying
Nrow = 10
Ncol = 10
N.1s = 5
flag <- TRUE
while (flag == TRUE) {
m <- matrix ((sample (c(rep(1, each=N.1s), rep(0,
each=((Ncol*Nrow)-N.1s))))), Nrow)
SUMROW <- rowSums(m)
if (SUMROW == N.1s) {flag <- TRUE} else {flag <- FALSE}
}
}
but I get this warning...
2006 Aug 07
1
rc6 build pb
...o userdb-passwd-file.o userdb-prefetch.o userdb-static.o userdb-vpopmail.o userdb-sql.o libpassword.a ../lib-settings/libsettings.a ../lib-ntlm/libntlm.a ../lib-sql/libsql.a ../lib/liblib.a -lcrypt -lpam -lldap -export-dynamic
../../libtool:1: no such file or directory: /usr/bin/sed -e 1s/^X//
libtool: ignoring unknown tag
../../libtool:1: no such file or directory: /usr/bin/sed -e 1s/^X//
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
../../libtool:1: no such file or directory: /usr/bin/sed -e 1s/^X...
2011 Jan 06
2
algorithm help
Hi, I am seeking help on designing an algorithm to identify the locations of
stretches of 1s in a vector of 0s and 1s. Below is an simple example:
> dat<-as.data.frame(cbind(a=c(F,F,T,T,T,T,F,F,T,T,F,T,T,T,T,F,F,F,F,T)
,b=c(4,12,13,16,18,20,28,30,34,46,47,49,61,73,77,84,87,90,95,97)))
> dat
a b
1 0 4
2 0 12
3 1 13
4 1 16
5 1 18
6 1 20
7 0 28
8 0 30
9 1 34
10 1 46...
2006 May 08
3
Non repetitive permutations/combinations of elements
Hello all,
I am trying to create a matrix of 1s and -1s without any repetitions for a
specified number of columns.
e.g. 1s and -1s for 3 columns can be done uniquely in 2^3 ways.
-1 -1 -1
-1 -1 1
-1 1 -1
-1 1 1
1 -1 -1
1 -1 1
1 1 -1
1 1 1
and for 4 columns in 2^4 ways and so on.
I finally used the function combn([0 1],3) that I foun...
2011 Dec 29
4
BalloonWorkerThread issue
Hello List,
Merry Christmas to all !!
Basically I''m trying to boot a Windows 2008R2 DC HVM with 90GB static max
memory and 32GB static min.
The node config is Dell M610 with X5660 and 96GB RAM and its running XCP 1.1
Many times the node crashes while booting HVM. Sometimes I get success.
I have attached the HVM boot log of successful start. Many times the node
hangs as soon as the
2010 Jul 28
3
how to code it??
Hi
I have say a large vector of 3500 digits. Initially the digits are 0s and
1s. I need to check for a rule to change some of the 0s to -1s in this
vector. But once I change a 0 to -1 then I need to start applying the rule
to change the next 0 only after I see the next 1 in the vector.
Say for example x = (0,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0,0,1)
I need to traverse from the 9th...
2009 Mar 24
3
Summarizing each row into a frequency table
I have a matrix containing -1, 0, 1, however certain rows will not
have all 3 numbers. I have written some codes to compute the frequency
table of how many -1s, 0s, 1s per row, but it is very ugly and not
efficient if there are more than 3 numbers. Please suggest.
m <- rbind(sample(0:1, replace=T, 10), sample(-1:1, replace=T, 10))
m.table <- t(apply(m, 1, function(x) c(sum(x==-1, na.rm=T), sum(x==0,
na.rm=T), sum(x==1, na.rm=T)) ))
m.table <- pr...
2011 Jul 05
2
sample function with different proportions
Hi there,
I guess this is an easy one, but still:
I would like to randomly sample 0s and 1s but in a way that I end up having for example 70% of 1s and the rest of 0s and not 50:50 as this function does: sample(c(0,1), 100, replace = TRUE)
Any recommendations?
Many thanks!
Ana
[[alternative HTML version deleted]]
2008 Dec 30
1
I would appreciate some help with clustering
I have a binary vector whose length is known.
Such a vector contains an unspecified number of 1s.
My goal is
1. to generate as many clusters as the number of 1s
2. to place the 1 as much as possible at the center of its own cluster
Example. Say I have the following binary vector:
v <- c(0,0,1,0,0,0,0,1,0,1,0,0)
Then I have to get 3 clusters.
I can generate a matrix containing the distance...
2014 Oct 22
0
[PATCH] tests: c-api: add $datadir and $databuilddir
...e0 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -2744,19 +2744,19 @@ data." };
style = RString "format", [String "filename"], [];
tests = [
InitEmpty, Always, TestResultString (
- [["disk_format"; "../data/blank-disk-1s.raw"]], "raw"), [];
+ [["disk_format"; "$databuilddir/blank-disk-1s.raw"]], "raw"), [];
InitEmpty, Always, TestResultString (
- [["disk_format"; "../data/blank-disk-1s.qcow2"]], "qcow2"), [];
+ [[...
2010 Apr 25
4
how to make read in a vector of 0s and 1s with no space between them
Hi all,
Probably a rudimentary question. I have a flat file that looks like
this (the real one has ~10e6 elements):
10110100101001011101011
and I want to pull that into R as a vector, but with each digit being
it's own element. There are no separators between the digits. How can
I accomplish this? Thanks in advance!
Matt
--
Matthew C Keller
Asst. Professor of Psychology
University of
2011 Nov 29
3
fill binary matrices with random 1s
Dear all, I am finding difficulty in the following, I would like to
create an empty matrix e.g. 10x10 of 0s and sequentially fill this
matrix with randomly placed a 1s until it is saturated. Producing 100
matrices of sequentially increasing density., This process needs to be
randomized 1000 times., I assume i should run this along the following
lines, 1) Create 1000 matrices all zeros, 2) add a random 1 to all
matrices, 3) run function on all 1000 matrices an...
2008 Nov 22
2
unique columns in a matrix and number of each
...ns of a matrix and the numbers of each unique column. For example, let's say I have a matrix with 6 columns, 2 of these are filled with the value of 1 and the other 4 are filled with the value of 0. I would then like to have a command that tells me what the unique columns are (so columns with 1s and columns with 0s) and the number of each type of column (so 2 columns of 1s and 4 columns of 0s) that occur in the matrix.
Thank you for any help anyone can provide!! I have been very impressed with the help that I have received so far!! Thank you!
2010 May 13
1
Questions about ggplot2
Hi I have two questions about using ggplot2.
First, I have multiple columns of data that I would like to combine into
one histogram where each column of data would correspond to one bar in
the histogram. Each column has 0 or 1s and I want my bars in the
histogram to correspond to the sum of the 1s in each column. Does that
make sense?
Second, is there a way to completely turn off the legend?
Thanks!
Chris
PS - Please cc me on the email as I'm a digest subscriber.
2007 Nov 06
0
2 quick doc patches looking for +1s or commits
Hi again everyone,
I''ve 2 tiny doc patches mostly involving grammar fixes (and errant
whitespace elimination). My English is not perfect so any review would
be very welcome.
The patches:
http://dev.rubyonrails.org/ticket/9819
http://dev.rubyonrails.org/ticket/10062
Thanks!
Cheers,
Chu Yeow
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2018 Mar 11
4
subsetting comparison problem
...1 1 1
Expected Output:
U1 satisfies R1, R3
U2 satisfies R1, R2, R3
So this is a comparison of dataframes problem, with a subset dimension.
There are 2 dataframe R and U. column names are same. There are certain
columns belonging to each row in dataframe 1, denoted as 1s, while there
are certain cols to each U denoted as 1s in each URow in dataframe2.
I have to find relationships between Rs and Us. So i start with each U row
in U dataframe (lets say U1 row) and try to find all the rows in R
dataframe, which are subset of U1 row.
I cant find a way to compare rows...
2008 Jun 15
1
Help finding the mode and maximum for a specified 'window' of time series data
...on,
particularly if there is too much or too little information.
I have a large time series data set where each subject's behavior was
originally coded on .25s intervals for 3min task. I am trying to determine
if the findings are different depending on the coding interval (i.e. Compare
.25s to 1s to 5s to 10s).
I also need to see if it makes a difference if I use the maximal value
within the interval or the modal value within the interval. In other words,
I do not need the average value.
Here a sample of my data with time as the first column:
sample <-cbind((1:20)*.25,c(1,1,1,2,2,3,3,...
2013 Mar 14
2
Modifying a data frame based on a vector that contains column numbers
Hello!
# I have a data frame:
mydf<-data.frame(c1=rep(NA,5),c2=rep(NA,5),c3=rep(NA,5))
# I have an index whose length is always the same as nrow(mydf):
myindex<-c(1,2,3,2,1)
# I need c1 to have 1s in rows 1 and 5 (based on the information in myindex)
# I need c2 to have 1s in rows 2 and 4 (also based on myindex)
# I need c3 to have 1 in row 3
# In other words, I am trying to achieve this result:
mygoal<-data.frame(c1=c(1,NA,NA,NA,1),c2=c(NA,1,NA,1,NA),c3=c(NA,NA,1,NA,NA))
I know how to d...
2003 Dec 11
3
Problems with file date/time creation and modification
...I want to do incrementals copy based on modification date...
I mount my samba shares from my Windows Boxs and use tools on the
micro$oft boxs. (Xcopy /D or SyncroniX )
The problem is that the modification date on the samba share and on de
source file on the M$ local disk is sometimes different by 1s (newer or
older).
For example I create a file c:\mytest.txt the file properties says
Created modified at 18:30:01
I xcopy it to my samba share window$ properties says Created modified at
18:30:00
which is older! so when I xcopy /D the file is copied again and again.
I'm Running samba-2.2.7a-8...
2012 Mar 29
3
RAID-10 vs Nested (RAID-0 on 2x RAID-1s)
Greetings-
I'm about to embark on a new installation of Centos 6 x64 on 4x SATA HDDs. The plan is to use RAID-10 as a nice combo between data security (RAID1) and speed (RAID0). However, I'm finding either a lack of raw information on the topic, or I'm having a mental issue preventing the osmosis of the implementation into my brain.
Option #1:
My understanding of RAID10 using 4