Displaying 20 results from an estimated 33 matches for "count2".
Did you mean:
count
2017 Aug 28
5
"Improvement with the R code"
.......n} then the code will not work, so can some
help me with this.
For and some rows of my data frame look like
checkdf=data.frame(clusterNum=c(3,2,3,1,1,3,4,3,2,1,1,3,2,1,3,2)
no_of_state=3
transition_matrix=matrix(NA,nrow=no_of_state, ncol=no_of_state)
for(k in 1: no_of_state)
{
count1=0
count2=0
count3=0
#For last point no transition takes place
for(j in 1: (nrow(checkdf)-1))
{
if(checkdf$clusterNum[j]==k)
{
if(checkdf$clusterNum[j+1]==1){
count1=count1+1
}
else if(checkdf$clusterNum[j+1]==2){
count2=count2+1
}
else {...
2017 Aug 28
0
"Improvement with the R code"
...help me with this.
>
> For and some rows of my data frame look like
>
> checkdf=data.frame(clusterNum=c(3,2,3,1,1,3,4,3,2,1,1,3,2,1,3,2)
> no_of_state=3
> transition_matrix=matrix(NA,nrow=no_of_state, ncol=no_of_state)
> for(k in 1: no_of_state)
> {
> count1=0
> count2=0
> count3=0
> #For last point no transition takes place
> for(j in 1: (nrow(checkdf)-1))
> {
>
> if(checkdf$clusterNum[j]==k)
> {
> if(checkdf$clusterNum[j+1]==1){
> count1=count1+1
> }
> else if(checkdf$clusterNum[j+1]==2)...
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...NT (1 << 23)
#define COUNT_LIMIT (1 << 25)
volatile int count = 0;
pthread_mutex_t count_mutex;
pthread_cond_t count_threshold_cv;
void *inc_count(void *t)
{
int j,i;
double result=0.0;
long my_id = (long)t;
for (i=0; i<TCOUNT; i++) {
//void *data = malloc(1);
int count2 = __sync_add_and_fetch(&count, 1);
/*
Check the value of count and signal waiting thread when condition is
reached. Note that this occurs while mutex is locked.
*/
if (count2 == COUNT_LIMIT) {
pthread_mutex_lock(&count_mutex);
pthread_cond_signal(&cou...
2001 Mar 16
1
combine dataset
Hi,
I have two data sets look like below:
==========================
state count1 percent1
CA 19 0.34
TX 22 0.35
FL 11 0.24
OR 34 0.42
GA 52 0.62
MN 12 0.17
NC 19 0.34
state count2 percent2
FL 22 0.35
MN 22 0.35
CA 11 0.24
TX 52 0.62
==========================
How to combine these two data set and make it look
like below? Thanks in advance!
======================================
state count1 percent1 count2 percent2
CA 19 0.34 11 0.24...
2009 Aug 20
2
Histogram problem
...ame(read.csv(file = "SPX.csv", header = TRUE, sep = ",", dec
= ".", fill = TRUE))
Max = max(SPXdf[,2])
Min = min(SPXdf[,2])
Count = length(SPXdf[,2])
sig = sd(SPXdf[,2])
BinSize = (3.5*sig)/(Count^(1/3))
BinNum = (Max - Min)/(BinSize)
Bins = seq(Min,Max,by = BinSize)
Count2 = length(Bins)
Num = mat.or.vec(1,Count2)
for (i in 1:Count){
for (j in 1:Count2){
if ((SPXdf[i,2] < Bins[j]))
{Num[j] = Num[j] + 1}
}
}
barplot(Num,Bins, xlab = "SPXdf", ylab = "Frequency")
[[alternative HTML version deleted]]
2009 Oct 29
1
operation with if/else on a dataframe
Hi to all,
I have this dataframe (I show the first six rows)
>head(table)
A R Fold.Change P.Value
Count1 Count2
1 ENSRNOE00000000002_at 0 1.13 0.60 1
1
2 ENSRNOE00000000009_at 0 -1.04 0.73 3
3
3 ENSRNOE00000000020_at 0 -1.08 0.68 0
0
4 ENSRNOE00000000021_at 0 -1.31...
2002 Jun 18
3
FINDNEXT problem, w2k and linux smbfs
...100TX -> Linux (client)
mount -t smbfs -o username=xxx,password=xxx,uid=0,gid=0,rw //w2k/c /mnt/w2kc
samba 2.2.4
mount.smbfs 2.2.4
Linux kernel 2.4.18
problem also exists
on samba-2.0.7 and kernel-2.4.2 (redhat-7.1)
PS
# Shell test
count1=`ls -l | wc -l`
cnt=1
while true ; do
count2=`ls -l | wc -l`
if [ $count2 != $count1 ]; then
echo "Error: $count2 != $count1"
fi
cnt=`expr ${cnt} + 1`
echo "Test : $cnt"
done
/* also java prog I used to test this problem on w2k and Linux
*/
import java.util.*;
import java.io.*;
public class SMBtes...
2012 Jul 11
3
Subset based on multiple values
...lt;- as.matrix(c(1,1,1,1,3,3,7,7,7,7))
Count <- tapply(test[,1], test[,1], length) # count for each value
spp <- unique(test[,1])
Count1 <- as.data.frame(cbind(Count,spp))
Max <- max(Count)
Count1$sppMax <- ifelse(Count1$Count >= Max, Count1$spp, 0) # only keep
values that =Max
Count2 <- subset(Count1, sppMax > 0) #get rid of values that are less
than Max
AllMax <- unique(Count2$sppMax)
test2 <- subset(test, test[,1] == AllMax)
this works where there is only one value for AllMax, how to make it work
when there are multiple?
Thank you!
--
View this message in c...
2017 Aug 28
0
"Improvement with the R code"
...t;>>> checkdf=data.frame(clusterNum=c(3,2,3,1,1,3,4,3,2,1,1,3,2,1,3,2)
>>>> no_of_state=3
>>>> transition_matrix=matrix(NA,nrow=no_of_state, ncol=no_of_state)
>>>> for(k in 1: no_of_state)
>>>> {
>>>> count1=0
>>>> count2=0
>>>> count3=0
>>>> #For last point no transition takes place
>>>> for(j in 1: (nrow(checkdf)-1))
>>>> {
>>>>
>>>> if(checkdf$clusterNum[j]==k)
>>>> {
>>>> if(checkdf$clusterNum[j+...
2009 Sep 19
2
Counting observations of a combined factor
...nteraction(df[,"f1"], df[,"f2"]), d=df[,"d"])
df2
# A count of the first data.frame using factor f1 returns the kind of
results I am looking for:
count <- as.data.frame(table(df$f1))
count
# Var1 Freq
#1 a 6
#2 b 6
# As does a count using factor2:
count2 <- as.data.frame(table(df$f2))
count2
# Var1 Freq
#1 a 6
#2 b 6
# The same procedure on the second dataframe does not treat the levels
of factor f3 discreetly, instead giving all possible combinations of f1
and f2.
count3 <- as.data.frame(table(df2$f3))
count3
# Var1 Freq...
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
...tile int count = 0;
> pthread_mutex_t count_mutex;
> pthread_cond_t count_threshold_cv;
>
> void *inc_count(void *t)
> {
> int j,i;
> double result=0.0;
> long my_id = (long)t;
>
> for (i=0; i<TCOUNT; i++) {
> //void *data = malloc(1);
> int count2 = __sync_add_and_fetch(&count, 1);
>
> /*
> Check the value of count and signal waiting thread when condition is
> reached. Note that this occurs while mutex is locked.
> */
> if (count2 == COUNT_LIMIT) {
> pthread_mutex_lock(&count_mutex);...
2007 Oct 19
0
calculating power of log rank test
hie
Im trying to calculate the power of the logrank test for different values of rho .I was just wandering whether the following programme would do it. any suggestions are welcome
s=50
number=1
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count7=0;
count8=0;count9=0
while(s!=0){
n=20
n1=n/2
n2=n/4
a11=1 ;a12=1.4 ;a21=16 ;a22=a12 * a21
t1<-array(1,c(n1))
t2<...
2017 Aug 28
0
"Improvement with the R code"
...,2,3,1,1,3,4,3,2,1,1,3,2,1,3,2)
>>>>>> no_of_state=3
>>>>>> transition_matrix=matrix(NA,nrow=no_of_state, ncol=no_of_state)
>>>>>> for(k in 1: no_of_state)
>>>>>> {
>>>>>> count1=0
>>>>>> count2=0
>>>>>> count3=0
>>>>>> #For last point no transition takes place
>>>>>> for(j in 1: (nrow(checkdf)-1))
>>>>>> {
>>>>>>
>>>>>> if(checkdf$clusterNum[j]==k)
>>>>>&g...
2008 Feb 14
0
help in simplyfiying programme
my program given below can some one make it presentable. I trying to simulate survival data and calculate the power. I think i could have done better.
s=10
number=0
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count8=0;
count9=0;
count11=0;count22=0;count33=0;count44=0;count55=0;count66=0;count77=0;
count88=0;count99=0;
while(s!=0){
n=100
n1=n/2
n2=n/4
t1<-array(1,c(n1))
t2<-array(2,c(n1))...
2004 Jul 07
1
Histograms, density, and relative frequencies
...wrong) relative frequency histogram approach.
My rough code looks like this:
bk <- c(0, .05, .1, .15, .2, .25,.3, .35, 1)
par(mfrow=c(1, 1))
fawn1 <- hist(MFAWNRESID[regs1], plot=F, breaks=bk)
fawn2 <- hist(MFAWNRESID[regs2], plot=F, breaks=bk)
count1 <- fawn1$counts/sum(fawn1$counts)
count2 <- fawn2$counts/sum(fawn2$counts)
b <- c(0, .05, .1, .15, .2, .25, .3, .35)
plot(count1~b,xaxt="n", xlim=c(0, .5), ylim=c(0, .40), pch=".", bty="l")
lines(spline(count1~b), lty=c(1), lwd=c(2), col="black")
lines(spline(count2~b), lty=c(2), lwd=c(2), col...
2009 Jul 09
3
Looking for recommendations for blocking hacking attempts
Hello:
I have been looking into projects that will automatically
restrict hacking attempts on my servers running CentOS 5.
I think the two top contenders are:
DenyHosts - http://denyhosts.sourceforge.net
Fail2ban - http://www.fail2ban.org
>From what I see, DenyHosts only blocks based on failed
SSH attempts whereas Fail2ban blocks failed attempts
for other access as well.
The main benefit
2012 Aug 14
2
igraph: Turn multiple edges into weights
Dear all,
I have some network data - about 300 vertices and several thousand edges. I
am looking for a way to turn multiple edges into weights of the edges. I
looked around and - surprisingly? - haven't found anything. Is there an
easy way to do this?
Best, Jonas
[[alternative HTML version deleted]]
2010 Jun 28
2
Stacked Histogram, multiple lines for dates of news stories?
Dear colleagues,
I have extracted the dates of several news stories from a newspaper
data base to chart coverage trends of an issue over time. They are in
a data frame that looks just like one generated by the reproducible
code below.
I can already generate a histogram of the dates with various intervals
(months, quarters, weeks years) using hist.Date. However, there are
two other
2007 Feb 20
1
Reshape (pivot) question
Hi R-users,
I have a data set like this (first ten rows):
id patient_id date code class eala ID1564262 1562 6.4.2006 12:00 5555 1
NA ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564264 1365 14.2.2006 14:35
5555 1 50 ID1564265 1342 7.4.2006 14:30 2222 2 50 ID1564266 1648 7.4.200614:30
2222 2 50 ID1564267 1263 10.2.2006 15:45 2222 2 10 ID1564267 1263
10.2.200615:45
3333 3 10 ID1564269 5646
2010 Apr 15
4
new ocfs2 release?
Hi ocfs2 developers,
there are some news about the schedule for a new ocfs2 release that solve the
actual bug/limitations? I can see an 1.4.7 release tagged here:
http://oss.oracle.com/git/?p=ocfs2-1.4.git;a=summary
Is there a planned release date?
in my environment (about 5000000 files with 300000 new files/deletion per day) I
see load until 1000 and I/O almost blocked for some hours of the