similar to: request: To access a particular list

Displaying 20 results from an estimated 10000 matches similar to: "request: To access a particular list"

2008 Sep 10
6
request: most repeated component of a list
Dear R community I have stored the results of arrays in a list consist of J-components (say 200 components). Each component containing same no of columns but may be different no of rows. e.g [[1]] [,1] [,2] [,3] [,4] [,5] [1,] 4 0 0 0 0 [2,] 4 3 4 0 0 [3,] 4 3 4 0 0 [4,] 4 3 0 0 0 [[2]] [,1] [,2] [,3] [,4] [,5]
2008 Oct 14
4
request: How to ignore columns having zero sums
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,] 1 2 3 4 0 0 [2,] 1 2 3 4 0 0 [3,] 1 2 3 4 0 0 [4,] 1 2 3 4 0 0 How can i ignore columns having zero sums? Help in this regard
2008 Oct 15
3
request: How can we ignore a component of list having no element
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,] 3 1 [2,] 3 1 [3,] 3 1 [[2]] NULL [[3]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 3 1
2008 Sep 06
2
request: most repeated sequnce
Dear R community Hope every one be in best of his/her health. I have a situation in which there are s-sectors. Each sector is further divided into r-rows and c-columns. All it makes an array having dimension (r,c,s). e.g. x=c(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,
2008 Sep 03
2
request: How to get column name
Dear R community I have a problem regarding which of the column in a matrix contains all of zero elements. e.g. x=c(3,3,3,3,0,0,0,0,5,5,5,5,8,8,8,8); x=matrix(x, nrow=4) the output is > x [,1] [,2] [,3] [,4] [1,] 3 0 5 8 [2,] 3 0 5 8 [3,] 3 0 5 8 [4,] 3 0 5 8 In this case the required column is second so the result should be "2".
2008 May 28
3
request: which integer in each column is in majority
Respected R helpers/ users I am one of the new R user. I have a problem regarding to know which of the integer in each column of the following matrix is in majority. I want to know that integer e.g. in the first column 1 is in majority. Similarly in the third column 4 is in majority. So what is the suitable way to get the desired integer for each column. I am looking for some kind reply. Thanks
2008 Jun 03
1
request: An array declarion problem
Dear R users I tried a lot to solve the following problem but could not. I have two arrays having same order i.e 1 by 150. j=10; ss=150; r=array(0 , c( j , ss )); rr=array(0 , c( j , ss )); r1=array(0 , c( j-1 , ss )); r2=array(0 , c( j-1 , ss )); r3=array(0 , c( 2 , ss )) for(i in 1:j-1){ r1[ i , ] <- r[ j+1, ]-r[ j, ]; r2[ i , ] <- rr[ j+1, ]-rr[ j, ]
2003 Oct 04
2
mixed effects with nlme
Dear R users: I have some difficulties analizing data with mixed effects NLME and the last version of R. More concretely, I have a repeated measures design with a single group and 2 experimental factors (say A and B) and my interest is to compare additive and nonadditive models. suj rv A B 1 s1 4 a1 b1 2 s1 5 a1 b2 3 s1 7 a1 b3 4 s1 1 a2
2008 Dec 01
1
request: how to assign alphabets to integer values
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("a"); y2=which(y==2); y[y2] <- c("b"); y3=which(y==3); y[y3] <-
2005 Jul 11
1
validation, calibration and Design
Hi R experts, I am trying to do a prognostic model validation study, using cancer survival data. There are 2 data sets - 1500 cases used to develop a nomogram, and another of 800 cases used as an independent validation cohort. I have validated the nomogram in the original data (easy with the Design tools), and then want to show that it also has good results with the independent data using 60
2013 Aug 27
1
[plyr] Moving average filter with plyr
Dear all, I'm stuck with a problem using plyr to process a rather large junk of data. What I'm trying to do is applying a moving average to all the subparts of the dataframe (the example data can be found here https://dl.dropboxusercontent.com/u/2414056/testData.Rdata). require(plyr) load("testData.Rdata") applyfilter<-function(x){ return(filter(x,rep(1/5, times=5))) }
2009 Feb 26
2
Merge question
Hi: I am a new R user. I have the following question and would appreciate your input Data1 (data frame 1) p1,d1,d2 (p1 is text and d1 and d2 are numeric) xyz,10,25 Data2 (data frame 2) p1,d1,d2 xyz,11,15 Now I want to create a new data frame that looks like so below. The fields d1 and s2 are summed by the product key. Data3 p1,d1,d2 xyz,21 (sum of 10 from Data1 and 11 from Data2),40 (sum of 25
2008 Sep 07
0
Fwd: request: most repeated sequnce
---------- Forwarded message ---------- From: jim holtman <jholtman at gmail.com> Date: Sun, Sep 7, 2008 at 11:42 AM Subject: Re: [R] request: most repeated sequnce To: Muhammad Azam <mazam72 at yahoo.com> This should do it for you: > x=c(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, +
2008 Jun 06
5
request: a class having max frequency
Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) > f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e 500. I used >which.max(f) which provide 0 1 How can i get only the "0". Thanks and best regards Muhammad Azam Ph.D. Student Department of
2015 Aug 05
1
Samba4 not able to write to group writeable folder???
Hi... With samba4 I sometimes feel like a bloody beginner even I use samba since ages. Miracle of the day: Users connecting using samba4 cannot write to group writeable folders even they should be able to. I upgraded one 3.6 fileserver to 4.2.3. PDC is always a samba 4.2.3 instance. I am using samba4 in classic PDC mode for a couple of reasons. On my fileserver I have a folder called
2010 Aug 13
1
Bug in t.test?
Hello all, due to unexplained differences between statistical results from collaborators and our lab that arose in the same large proteomics dataset we reevaluated the t.test() function. Here, we found a weird behaviour that is also reproducible in the following small test dataset: Suppose, we have two vectors with numbers and some missing values that refer to the same individuals and that
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All, I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order. My data have a variable called "RowNo" that functions almost like a
2005 Apr 22
1
Need help arranging the plot in different fashion than the default format
I want to change the way the plot is appearing in the barchart .. testdata <-
2003 Sep 23
2
confusion about what to expect?
In playing around with data.frames (and wanting a simple, cheap way to use the variable and case names in plots; but I've solved that with some hacks, yech), I noticed the following behavior with subsetting. testdata <- data.frame(matrix(1:20,nrow=4,ncol=5)) names(testdata) ## expect labels, get them names(testdata[2,]) ## expect labels, get them names(testdata[,2]) ## expect labels, but
2005 Apr 25
1
Need help with panel.segment..
Hi All, For the following code, I'm not sure why the error bars are appearing horizontal. Can someone please tell me how to fix the problem. testdata <-