[R] negative extents to matrix

2013-05-16 Thread Muhammad Azam
lp=apply(vlp,3,function(vlp) which(rowSums(vlp)!=0))[1:n]; for(i in 1:nnodes){for(ii in 1:nc){if(any(vlp[,,i][ii,]!=0)){vlfp[[i]] <- vlp[,,i][ii,]; vvlfp[[i]] <- vvlp[,,i][ii,]}}}; vlf1p <- do.call('rbind',vlfp); vvlf1p <- do.call('rbind',vvlfp);

[R] request: maximum depth reached problem

2009-04-09 Thread Muhammad Azam
rol=tree.control(nobs = 150, minsize = 5, mincut = 2)) Any suggestion will be appreciated to handle the above problem. Thanks and best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list http

[R] request: cost complexity parameter "k"

2009-04-02 Thread Muhammad Azam
ne.tree(miris, method=c("misclass"), best = NULL, k=0); iris.prun; summary(iris.prun); plot(iris.prun) best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Request: Optimum value of cost complexity parameter "k" in "tree" package

2009-04-01 Thread Muhammad Azam
; iris.prun=prune.tree(miris, method=c("misclass"), best = NULL, k=0); iris.prun; summary(iris.prun); plot(iris.prun) best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:

[R] loop problem

2009-03-26 Thread Muhammad Azam
rd for some help. Thanks and best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proje

Re: [R] request: how to assign alphabets to integer values

2008-12-01 Thread Muhammad Azam
Dear Gabor Grothendieck Thanks a lot for the help. M. Azam From: Gabor Grothendieck <[EMAIL PROTECTED]> Cc: R-help request <[EMAIL PROTECTED]>; R Help Sent: Monday, December 1, 2008 12:46:06 PM Subject: Re: [R] request: how to assign alphabets to integer value

[R] request: how to assign alphabets to integer values

2008-12-01 Thread Muhammad Azam
Dear R community I am trying to assign alphabets to integer values 1, 2, 3 etc. in y given below. Can any body suggest some simple way to do the same job? ds=iris; dl=nrow(ds) c1=ds[,1]; c2=ds[,2]; c3=ds[,3]; c4=ds[,4]; c5=ds[,5]; iris=cbind(c1,c2,c3,c4,c5) y=iris[,5] y1=which(y==1); y[y1] <- c(

Re: [R] request: How to combine three matrices in the desired form

2008-10-30 Thread Muhammad Azam
Dear Jim Thanks a lot for such a nice solution. best regards M.Azam From: Jim Lemon <[EMAIL PROTECTED]> Cc: R Help Sent: Thursday, October 30, 2008 10:06:57 AM Subject: Re: [R] request: How to combine three matrices in the desired form Hi Muhammad, Try this:

[R] request: How to combine three matrices in the desired form

2008-10-30 Thread Muhammad Azam
Dear R-friends I have three matrices e.g. var <- matrix(c(4,4,4,4,0,4,4,4,0,3,3,0),nrow=4); val <- matrix(c(0.6,0.6,0.6,0.6,0,1.6,1.6,1.6,0,4.9,4.9,0),nrow=4); nod <- matrix(c(-1,-1,1,1),ncol=1) > var [,1] [,2] [,3] [1,]400 [2,]443 [3,]443 [4,]44

Re: [R] Odp: Request: Most repeated sequence considering combinations at each row

2008-10-27 Thread Muhammad Azam
Dear Petr Thanks for the response. Hope it will now help me to proceed. best regards M.Azam From: Petr PIKAL <[EMAIL PROTECTED]> Cc: R Help ; [EMAIL PROTECTED] Sent: Monday, October 27, 2008 8:43:27 AM Subject: Odp: [R] Request: Most repeated sequence considerin

[R] Request: Most repeated sequence considering combinations at each row

2008-10-24 Thread Muhammad Azam
Dear friends Hope you all are fine. Suppose we have a list of arrays. a1=c(4,4,4,4,0,4,4,4,0,3,3,0,0,0,0,0); a1=array(a1,dim=c(4,4)); a2=c(4,4,4,4,0,4,4,4,0,3,3,0,0,0,0,0); a2=array(a2,dim=c(4,4)); a3=c(4,4,4,4,0,3,3,4,0,4,4,0,0,0,0,0); a3=array(a3,dim=c(4,4)); a4=c(4,4,4,4,4,0,3,3,3,3,0,4,4

[R] Request: How to draw a tree

2008-10-16 Thread Muhammad Azam
Dear friends As a result I get an array containing certain no of rows and columns. In the resultant array first row represents first node of a tree starting from left side, second row represents second node of that tree and so on. In the example below, the resultant tree contains 6 nodes. We ge

Re: [R] request: How can we ignore a component of list having no element

2008-10-15 Thread Muhammad Azam
Dear Mahbub Thanks a lot for the help. - Original Message From: Mahbub Latif <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Sent: Wednesday, October 15, 2008 12:30:13 PM Subject: Re: [R] request: How can we ignore a component of list having no element try

[R] request: How can we ignore a component of list having no element

2008-10-15 Thread Muhammad Azam
Dear friends There is a list of arrays comprising different no of rows and columns even sometimes NULL, such as [[2]] given below. How can we ignore [[2]] or others like this in the complete list. Any help in this regard is needed. Thanks [[1]] [,1] [,2] [1,]31 [2,]3

Re: [R] request: How to ignore columns having zero sums

2008-10-14 Thread Muhammad Azam
Dear Jorge Thanks a lot. - Original Message From: Jorge Ivan Velez <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: R mailing list Sent: Tuesday, October 14, 2008 1:52:15 PM Subject: Re: [R] request: How to ignore columns having zero sums Dear Muhammad,

Re: [R] request: How to ignore columns having zero sums

2008-10-14 Thread Muhammad Azam
Dear Dimitris Thanks a lot. - Original Message From: Dimitris Rizopoulos <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: R Help Sent: Tuesday, October 14, 2008 10:10:54 AM Subject: Re: [R] request: How to ignore columns having zero sums try t

[R] request: How to ignore columns having zero sums

2008-10-14 Thread Muhammad Azam
Dear friends I have an array consist of r-rows and c-columns e.g. x=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,0,0,0,0,0,0,0,0); x1=array(x, dim=c(4,6)) output is > x1 [,1] [,2] [,3] [,4] [,5] [,6] [1,]123400 [2,]123400 [3,]123400

Re: [R] request: most repeated component of a list

2008-09-11 Thread Muhammad Azam
Thanks a lot for this effort. - Original Message From: Dimitris Rizopoulos <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED]; R Help Sent: Thursday, September 11, 2008 10:52:16 AM Subject: Re: [R] request: most repeated component of a l

Re: [R] request: most repeated component of a list

2008-09-11 Thread Muhammad Azam
[2,]258 11 [3,]369 12 Hope it is much more clear as before. best regards Muhammad Azam - Original Message From: Adam D. I. Kramer <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: R Help Sent: Thursday, September 11, 2008 9:53:40 AM

Re: [R] request: most repeated component of a list

2008-09-11 Thread Muhammad Azam
Azam - Original Message From: jim holtman <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: R-help request <[EMAIL PROTECTED]>; R Help Sent: Wednesday, September 10, 2008 5:59:28 PM Subject: Re: [R] request: most repeated component of a list If want you w

[R] request: most repeated component of a list

2008-09-10 Thread Muhammad Azam
help in this regard will be appreciated. Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] request: table of sequences

2008-09-10 Thread Muhammad Azam
Dear R community Thanks. The problem has been solved by just using "return(rows)" Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] request: table of sequences

2008-09-10 Thread Muhammad Azam
ld not get the desired results (i mean frequencies of all possible sequences)e.g. for first sector the result should be 1 3 and so on. Please suggest me some suitable way. Thanks Muhammad Azam [[alternative HTML version deleted]] _

Re: [R] request: most repeated sequnce

2008-09-06 Thread Muhammad Azam
cases where all elements are zeros and interested to get "44 0000000 0" or just " 4 4 " in case 2. Thanks and best regards Muhammad Azam - Original Message ---- From: jim holtman <[EMAIL PROTECTED]> To: Muhammad Azam <

[R] request: most repeated sequnce

2008-09-06 Thread Muhammad Azam
lem. Thanks best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] request: How to get column name

2008-09-03 Thread Muhammad Azam
3058 In this case the required column is second so the result should be "2". How can i get it? best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:/

[R] request: To access a particular list

2008-06-27 Thread Muhammad Azam
pt to select less than one element". How can i tackle this problem to access vr[[n-1]]. Please give some suitable suggestions. Thanks and best regards Muhammad Azam [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] request: a class having max frequency

2008-06-06 Thread Muhammad Azam
can i get only the "0". Thanks and best regards Muhammad Azam Ph.D. Student Department of Medical Statistics, Informatics and Health Economics University of Innsbruck, Austria [[alternative HTML version deleted]] __ R-help@

[R] request: An array declarion problem

2008-06-03 Thread Muhammad Azam
(r1[ i, ], r2[ i, ]) But there is an error message Error in r3[i, ] = rbind(r1[i, ], r2[i, ]) : number of items to replace is not a multiple of replacement length I am looking for some suggestion to solve the problem. Thanks and best regards Muhammad Azam Ph.D. Student Depar

[R] request: To add an extra row in a matrix

2008-06-02 Thread Muhammad Azam
1] [,2] [,3] [1,]789 Now i want to get result like this [,1] [,2] [,3] [1,]135 [2,]246 [3,]789 Can any body help to get the required result. Thanks and best regards Muhammad Azam Ph.D. Student Department of Medical Statistics, Informatic

[R] request: which integer in each column is in majority

2008-05-28 Thread Muhammad Azam
343 [5,]2343 best regards Muhammad Azam Ph.D. Student Department of Medical Statistics, Informatics and Health Economics University of Innsbruck, Austria [[alternative HTML version deleted]] __ R-