Displaying 20 results from an estimated 873 matches for "zz".
Did you mean:
zzz
2009 Jun 08
2
help to speed up loops in r
Hi
i am using a script which involves the following loop. It attempts to reduce a data frame(zz) of 95000 * 41 down to a data frame (averagedreplicates) of 95000 * 21 by averaging the replicate values as you can see in the script below. This script however is very slow (2days). Any suggestions to speed it up.
NB I have also tried using rowMeans rather than adding the 2 values and dividing b...
2009 Nov 04
4
unexpected results in comparison (x == y)
...ences to vector Z and selecting only (xj -
xk), omitting (xk - xj)
# and (xj - xj) i.e. diagonal vector
Z = rep(0, ((i[1]*i[1])-i[1])/2)
nn <- 1
for (j in 1:i[1]) {
for (k in 1:i[1]) {
if (j > k) {
Z[nn] <- abs(Y[j,k])
nn <- nn + 1
}
}
}
nn <- nn - 1
# sorting Z ascending to ZZ, to determine double entries with same
difference
ii <- 0
ZZ <- sort(Z)
# here the problem occurs:
ZZ[1:10]
ZZ[4]
ZZ[5]
ZZ[4] == ZZ[5]
mode(ZZ[4])
mode(ZZ[5])
length(ZZ[4])
length(ZZ[5])
attributes(ZZ[4])
attributes(ZZ[5])
-----------------------------------------------
I get:
> ZZ[1:1...
2009 May 15
2
Help with loops
Hi
I am trying to create a loop which averages replicates in my data.
The original data has many rows. and consists of 40 column zz[,2:41] plus row headings in zz[,1]
I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on.
below is my script but it seems to be stuck in an endless loop
Any suggestions??
for (i in 1:length(average_value[,1])) {
average_value[i] <- i^100;...
2009 May 15
1
Fw: Help with loops(corrected question)
...t Patel <amitrhelp at yahoo.co.uk>
> Subject: Help with loops
> To: r-help at r-project.org
> Date: Friday, 15 May, 2009, 12:17 PM
> Hi
> I am trying to create a loop which averages replicates in
> my data.
> The original data has many rows. and consists of 40 column
> zz[,2:41] plus row headings in zz[,1]
> I am trying to average each set of values (i.e. zz[1,2:3]
> averaged and placed in average_value[1,2] and so on.
> below is my script but it seems to be stuck in an endless
> loop
> Any suggestions??
>
> for (i in 1:length(zz[,1])) {
>...
2002 May 20
1
how does one apply Western Electric / AT&T rules to R plots?
I have searched for info on how to apply the Western Electric rules for
process control, to data and plots I have in R, but I have not been able
to learn how.
Any help would be greatly appreciated.
Thank you,
sjcrauhut at agere.com
05/20/02
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2006 Nov 03
1
mbox sync: Expunged message reappeared in mailbox
...ning, one user on my dovecot server is
receiving hundreds of copies of old email. This is a short
excerpt from my dovecot.log showing the problem:
> dovecot: Nov 03 05:27:02 Info: pop3-login: Login:
> user=<howard at obfusca.ted>, method=PLAIN, rip=::ffff:81.44.31.210,
> lip=::ffff:zz.zz.zz.zz, TLS
> dovecot: Nov 03 05:27:02 Info: POP3(howard at obfusca.ted): Disconnected:
> Logged out top=0/0, retr=0/0, del=0/0, size=0
> dovecot: Nov 03 05:32:01 Error: POP3(joyce at obfusca.ted): mbox sync:
> Expunged message reappeared in mailbox
> /var/mail/vhosts/obfusca.ted/j...
2010 Jun 22
4
seek() and gzfile() on 32-bit R2.12.0 in linux
...9;t appear in the 64-bit installation. I
realize that seek() has been difficult in the past, and I don't want to open
old wounds, but is this a known problem? Is this easily fixable? I have a
package that relies on seek() when accessing gzipped files.
Using the 32-bit installation...
*> zz <- file("ex.data", "w") # open an output file connection
> cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file = zz, sep =
"\n")
> cat("One more line\n", file = zz)
> close(zz)
> blah...
2004 Jan 26
5
conditional assignment
Hi all
I want to conditionally operate on certain elements of a matrix, let me
explain it with a simple vector example
> z<- c(1, 2, 3)
> zz <- c(0,0,0)
> null <- (z > 2) & ( zz <- z)
> zz
[1] 1 2 3
why zz is not (0, 0, 3) ?????
the null <- assignment is to keep the console silent
in the other hand, it curious that null has reasonable values
> null
[1] FALSE FALSE TRUE
Thanks in advance
Ulisses...
2008 Jan 16
3
replace numbers in a column conditional on their value
Dear R help,
I have a data frame column in which I would like to replace some of the numbers dependent on their value.
data frame = zz
AveExpr t P.Value FC
7.481964 7.323950 1.778503e-04 2.218760
7.585783 12.233056 6.679776e-06 2.155867
6.953215 6.996525 2.353705e-04 1.685733
7.647513 8.099859 9.512639e-05 1.674742
7.285446 7.558675 1.463732e-04 1.584071
6.405605 3.344031 1.276812e-02 1.541569
I wo...
2008 Jul 30
1
model mix problem. FALSE CONVERGENCE
...sultats=NULL
Res=NULL
i=0
while(i!=length(ions)) {
i=i+1
myion=toto[,i]
mixed=lme(myion ~ v1*v2, random= ~ 1 | Subject/v1,method="REML")
## effet al?atoire sujet(v1)
#summary(mixed)
#anova(mixed)
zz=anova(mixed)
Res <-
data.frame(ions[i],toto1[i,2:(dim(toto1)[2]-n)],t(zz[-1,4]),toto1[i,c((dim(toto1)[2]-n+1):dim(toto1)[2])])
Resultats <- rbind(Resultats,Res)
}
if (i!=length(ions)) {
while(i!=length(ions)) {
i=i+1
myion=...
2005 Jul 10
0
Time out not working from php agi...
...ame or address
2005-06-28 20:26:13 DEBUG[19094] chan_h323.c: Placing outgoing call to
880178034593@xx.xx.xx.xx:1720, 101
2005-06-28 20:26:13 VERBOSE[19094] logger.c: -- Called
880178034593@xx.xx.xx.xx:1720
2005-06-28 20:58:41 DEBUG[19094] channel.c: Didn't get a frame from
channel: IAX2/User@zz.zz.zz.zz:4569-13
2005-06-28 20:58:41 DEBUG[19094] channel.c: Bridge stops bridging
channels IAX2/User@zz.zz.zz.zz:4569-13 and H323/
2005-06-28 20:58:41 DEBUG[19094] app_dial.c: Exiting with DIALSTATUS=ANSWER.
2005-06-28 20:58:41 VERBOSE[19094] logger.c: callcard.php: >> GET
VARIABLE ANSWEREDT...
2005 Aug 29
4
ttda on R 2.1.1: error
Hello,
I'm trying to use the package ttda, wich is involved in text analysis,
for my own data about answers in a company survey.
I've installed it, as well as ispell, but when trying to use an example:
> zz <- file("stupid.txt", "w") # build a data file
> cat("{comment - stupid data file} \n" , file = zz)
> cat("<uci=1> Hush-a-bye, baby, \n" , file = zz)
> cat(" in the tree top. \n"...
2002 Oct 17
4
Multiple colors in plots/lookup function
Hello,
I'd like to do something like:
n<-100
zz<-cbind(rnorm(n),rnorm(n),floor(runif(n)*3+1))
colors<-c("red","green","blue")
plot(zz,col=colors(zz[3]))
and have a matrix of scatterplots colored by class. The above does not
work, of course, but I'm not sure exactly what function I'm looking for....
2005 Jun 02
1
Wishlist: more flexible handling of tick labels in axis.Date (PR#7913)
...te"
if (d < 7)
if (missing(format))
format <- "%a"
if (d < 100) {
z <- structure(pretty(z), class = "Date")
if (missing(format))
format <- "%b %d"
}
else if (d < 1.1 * 365) {
zz <- as.POSIXlt(z)
zz$mday <- 1
zz$mon <- pretty(zz$mon)
m <- length(zz$mon)
m <- rep.int(zz$year[1], m)
zz$year <- c(m, m + 1)
z <- .Internal(POSIXlt2Date(zz))
if (missing(format))
format <- "%b"...
2013 Apr 15
2
Remove Rows Based on Factor
...hat I am getting. I am hoping
that this is a simple syntax phenomenon that somebody else knows off the
top of their head. My apologies for not providing a reproducible example
but I think that the information given will allow someone to give me a
hint.
I want to delete the rows of the data frame ZZ where Index is earlier that
Jan 1 of 2007. That Index column is a factor. When I tired a couple of
different methods, I got the error shown below. Can anybody tell me what
I am doing wrong? I would really appreciate it.
--John Sparks
> str(ZZ)
'data.frame': 1584 obs. of 7 variab...
2013 Apr 08
2
cbind for list of zoo objects
Can someone explain why this happens when one of the list elements is named 'all'?
> zz <- list( zoo(1:10,1:10), zoo(101:110,1:10), zoo(201:210,1:10) )
> names(zz)<-c('test','bar','foo')
> do.call(cbind,zz)
test bar foo
1 1 101 201
2 2 102 202
3 3 103 203
4 4 104 204
5 5 105 205
6 6 106 206
7 7 107 207
8 8 108 208...
2007 Nov 09
1
make check-all fails on F8
...; "ls()" "pi" "# last line"
> source("testIO.R", echo=TRUE)
> #line 1
> 2+3
[1] 5
> ls()
[1] "z"
> pi
[1] 3.141593
> unlink("testIO.R")
>
> ## ======== LF file, incomplete final line
> zz <- file("testIO.R", "wt")
> cat(z, file=zz, sep="\n")
> cat("5+6", file=zz)
> close(zz)
> readLines("testIO.R")
[1] "#line 1" "2+3" "ls()" "pi" "# last line"...
2001 Oct 09
3
Unlisting while preserving object types?
Hi
A toy example is probably the least ambiguous way of explaining what I'm
trying to do.
> library(ts)
> zz<-list(a=rnorm(100),b=rt(100,3))
> zz.spec<-lapply(zz,spectrum,plot=F)
> summary(zz.spec)
Length Class Mode
a 15 spec list
b 15 spec list
I'm looking for an elegant way to fetch components of the sub-lists a and b
of zz.spec;
e.g. to make a matrix with columns a$spec an...
2006 Aug 31
2
cumulative growth rates indexed to a common starting point over n series of observations
What is the R way of computing cumulative growth rates given a series of
discrete values indexed .
For instance, given a matrix of 20 observations for each of 5 series (zz),
what is the most straight forward technique in R for computing cumulative
growth (zzcum) ?
It seems for the solution I'm after might be imbedding the following cum
growth rate calc as a function into a function call to apply, mapply, ...?
zz = rnorm(100)
dim(zz) = c(20,5)
zz
zzcum=matr...
2004 Mar 17
9
Frequency table
...site search.
I am trying to construct a frequency table. I guess this should be done with
table. Or perhaps factor and split. Or prop.table. cut? findInterval? Argh!
Please correct me if what I am looking for is not called a "frequency table".
Perhaps it's called grouped data.
> zz$x9
[1] 65 70 85 65 65 65 62 55 82 59 55 66 74 55 65 56 80 73 45 64 75 58 60 56 60
[26] 65 53 63 72 80 90 95 55 70 79 62 57 65 60 47 61 53 80 75 72 87 52 72 80 85
[51] 75 70 84 60 72 70 76 70 79 72 69 80 62 74 54 58 58 69 81 84
I (think) I want it to look like:
40-49 2
50-59 15
60-69 20
70-...