similar to: Sampling letters

Displaying 20 results from an estimated 20000 matches similar to: "Sampling letters"

2007 Apr 24
5
intersect more than two sets
Hi, I searched the archives and did not find a good solution to that. assume I have 10 sets and I want to have the common character elements of them. how could i do that? -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2008 Jun 11
4
Matrix transformation problem
ng, I have a matrix (x) with binary content. Each row of the matrix holds exactly one 1, and the rest of the row is zeros. The thing is that I need to 'collapse' the matrix to one column where each row holds the original column index of the 1's (y). Sometimes, the matrix is quite large, so I have a perfomance problem. x <- matrix(c(1,0,0, 0,0,1, 0,1,0, 0,0,1, 0,1,0,
2008 Mar 10
1
How can I sample from a two-dimensional grid of points
Hi everyone, My goal is to sample from a two-dimensional grid. Consider the following example of code: n.grid <- 500 muA.grid <- seq(-4,4, length=n.grid) muB.grid <- seq(-4,4, length=n.grid) mu.p <- matrix(NA, nrow=n.grid, ncol=n.grid) for(i in 1:n.grid){ for(j in 1:n.grid){ mu.p[i,j] <- dnorm(muA.grid[i], 0, 1)*dnorm(muB.grid[j], 0, 0.5) } } mu.p <-
2004 Dec 05
1
matrix of 1,0's to a data.frame of factors
Hi, I have an integer matrix consisting of 1's and 0's and I would like to convert this to a data.frame where each column of the matrix becomes a factor variable. Now, some columns of the matrix have only 1's or only 0's as a result there is only 1 level for those columns in the data.frame. However it is required that each factor have 2 levels. So my solution is: m <-
2008 Jun 17
5
How to control height of abline
I use matplot to get the density curve and then I use abline(v=g$V2, col = 3 ) to get the vertical line. Goal : I want very small lines at the bottom on the x axis , if possible in the arrow forms instead of vertical lines on the whole graph. Thanks a lot. [[alternative HTML version deleted]]
2008 Jul 22
2
Table orderd by frequencies
Dear List, I try to order the output of a table by the frequencies of the vector I am look at. The object I am looking at is a factor with a lot of levels that were named only once. Therefore it would be much easier to order the output by the frequencies of the levels. E.g. > levels(a) "a" "b" "c" "d" Preferred outcome: table(a) b c a d 10 5 1 1
2008 Mar 30
2
Alignment and Reshaping of the matrix
Dear R users, I have a matrix like 85 .90 86 .89 87 .98 86 .87 88 .98 90 .78 88 .76 89 .56 90 .67 95 .67 89 .89 90 .87 91 .56 96 .87 90 .76 92.98 each pair of columns present a variable name and next the value. I have matrix with more than 500 rows and column. Now I want to convert this matrix in to. 85 .90 00 .00 00 86 .00 .89 .00 .87 87 .00 00 .98 00 88 .98 00 .76
2006 Jul 02
2
how to recode in my dataset?
Dear Rusers, My question is about "recode variables". First, i'd like to say something about the idea of recoding: My dataset have three variables:type,soiltem and airtem,which means grass type, soil temperature and air temperature. As we all known, the change of air temperature is greater than soil temperature,so the values in those two different temperaturemay represent different
2007 Feb 22
3
List filtration
Hello R-ologists, Imagine you have a list "list" like so: >list [[1]] [1] "IPI00776145.1" "IPI00776187.1" [[2]] [1] "Something" "IPI00807764.1" "IPI00807887.1" [[3]] [1] "IPI00807764.1" [[4]] [1] "Somethingelse" What I need to achieve is a filtered list "list2" like so: >list2 [[1]] [1]
2007 Apr 23
1
data recoding problem
Hi R experts, I have a data recoding problem I cant get my head around - I am not that great at the subsetting syntax. I have a dataset of longitudinal toxicity data (for multistate modelling) for which I want to also want to do a simple Kaplan-Meier curve of the time to first toxic event. The data for 2 cases presently looks like this (one with an event, the other without), with id representing
2005 Apr 19
2
indexing an array using an index-array, but one entry being ', '
Hi I have the following array: test <- array(c(1:16), dim = c(3,4,3)) test ## I call some enries using an index array test.ind <- array(rbind(c(1,2,1), c(3,3,2)), dim = c(2,3)) test[test.ind] ## suppose I want all values in the 2nd row and 4th col over ## all three 3rd dimensions test[2,4,] how to specify a test.ind array with the last index left with ',' i.e test.ind should be
2006 Mar 10
3
Sweave scientific real display format (e.g. 5e-12)
Dear All, I couldn't figure and couldn't google out how to make construct a pair of \Sexpr s or a LaTeX macro that would include 5\cdot 10^{-12} into the LaTeX output istead of 5e-12 . Any ideas? Thank you G?bor
2007 Jan 24
4
Replace missing values in lapply
I have some matrices stored as elements in a list that I am working with. On example is provided below as TP[[18]] > TP[[18]] level2 level1 1 2 3 4 1 79 0 0 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0 Now, using prop.table on this gives > prop.table(TP[[18]],1) level2 level1 1 2 3 4 1 1 0 0 0 2 3
2007 Jun 01
2
how to extract the maximum from a matrix?
Dear UseRs, I have a very simple question. I have a big matrix (say x) including probabilities (values in (0,1)). I have to store in a list the names of the row and the column where max(x) is located. How can I proceed? Thanks in advance for your assistance! mirko
2007 Sep 03
1
match help
In my code, I would like to replace entries in t with entries from a random normal distribution. n<-10 > nl<-round(1.5+rexp(1,rate=2) rate=2)) > nl [1] 2 > r<-1:n > s<-sort(sample(r,nl)) > t<-match(r,s) > r [1] 1 2 3 4 5 6 7 8 9 10 > s [1] 3 8 >t [1] NA NA 1 NA NA NA NA 2 NA NA t.random<-function(x) {for(i in 1:n) ifelse(x[i]!=NA,
2008 May 08
2
speeding up a special product of three arrays
I am struggling with R code optimization, a recurrent topic on this list. I have three arrays, say A, B and C, all having the same number of columns. I need to compute an array D whose generic element is D[i, j, k] <- sum_n A[i, n]*B[j, n]*C[k, n] Cycling over the three indices and subsetting the columns won't do. Is there any way to implement this efficiently in R or should I resign to
2016 Feb 17
2
Call for testing: OpenSSH 7.2
On Wed, 17 Feb 2016, Hisashi T Fujinaka wrote: > And in another "oh duh" moment, I think this dumped core on two different > machines and I sent you the bt from the wrong machine. Here's the one > from NetBSD-7. > > #0 0x00007f7ff630e55a in _lwp_kill () from /usr/lib/libc.so.12 > (gdb) bt > #0 0x00007f7ff630e55a in _lwp_kill () from /usr/lib/libc.so.12 >
2005 Feb 21
5
Compare rows of two matrices
Hello, #I have two matrices, eg.: y <- matrix( c(20, NA, NA, 45, 50, 19, 32, 101, 10, 22, NA, NA, 80, 49, 61, 190), ncol=4 ) x <- matrix( c(20, NA, NA, NA, 50, 19, 32, 101, 10, 22, NA, NA, 80, 49, 61, 190), ncol=4 ) #Whereas x contains all NA?s from y plus some additional NA?s. #I want to find the index of these additional NA?s. I think, there must be a very
2016 Feb 17
2
Call for testing: OpenSSH 7.2
On Wed, 17 Feb 2016, Hisashi T Fujinaka wrote: > > This one is failing a test assetion - there should be some more useful > > output available from the test itself. > > I think it's this: > > test_hostkeys: > regress/unittests/hostkeys/test_iterate.c:163 test #1 "hostkeys_iterate all > with key parse" > ASSERT_INT_EQ(sshkey_load_public(
2006 Nov 19
4
The most common row in a matrix?
Hi, How do you get the most common row from a matrix? If I have a matrix like this array(1:3,dim=c(4,5)) [,1] [,2] [,3] [,4] [,5] [1,] 1 2 3 1 2 [2,] 2 3 1 2 3 [3,] 3 1 2 3 1 [4,] 1 2 3 1 2 in which rows 1 and 4 are similar, I want to find that vector c (1,2,3,1,2). Atte Tenkanen University of Turku, Finland