similar to: on how to make a skip-table

Displaying 20 results from an estimated 20000 matches similar to: "on how to make a skip-table"

2013 Sep 13
2
how to get values within a threshold
input: > values [1] 0.854400 1.648465 1.829830 1.874704 7.670915 7.673585 7.722619 > thresholds [1] 1 3 5 7 9 expected output: [1] 1 4 4 4 7 That is, need a vector of indexes of the maximum value below the threshold. e.g. First element is "1", because value[1] is the largest below threshold "1". Second element is "4", because value[4] is the
2007 Jun 23
2
--cuesheet include the full cue sheet or just the seekponints?
Dear list Sorry to ask a user's question on developer list. I didn't find the user list. I am experimenting with --cuesheet and encoded a flac file with a cuesheet. Result is: * Totem on opensuse 10.2 opens the flac file with no meta data, no play list. "Next" button doesn't work; * Mplayer on opensuse 10.2 opens the flac file with no meta data,
2006 Sep 06
3
Intel Boot Agent: PXE-E32: TFTP open timeout for correctly configured tftp-hpa
Hello. In my case I can successfully boot up my Thinkpad X32, but the same configuration doesn't work for my desktop computer with Intel network card, with Intel Boot Agent 2.2 DHCP server is 10.0.0.1, tftpd (used tftp-hpa) runs on 10.0.0.32. netstat told me the daemon listen to 69 UDP port just fine. running tftp in commandline also shows it works (retrieve pxelinux.0 less then 1 second).
2012 Jul 30
3
replace values in vector from a replacement table
Dear all I've got stuck when trying to replace values in a vector by selecting replacements from a replacement table. I'm trying to use only base functions. Here's a dummy example: > (x <- rep(letters,2)) [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l"
2007 Apr 11
1
samba: offer public share to Windows 98 and writable share to Windows XP
Dear List. My requirement is to set up a samba share named "music" that: I. it's read-only accessible from both Windows 98 and Windows 2000/XP not requiring password; II. it's write-accessible from Windows XP protected by a password. I thought in order to cope with Windows 98 I need to I. use "security = share" (done), and set "guest ok =
2012 Feb 21
2
Dataframes in PLS package
I have been working with the pls procedure and have problems getting the procedure to work with matrix or frame data. I suspect the problem lies in my understanding of frames, but can't find anything in the documentation that will help. Here is what I have done: I read in an 10000 x 8 table of data, and assign the first four columns to matrix A and the second four to matrix B pls <-
2013 Oct 11
3
matrix values linked to vector index
Hi, In the example you showed: m1<- matrix(0,length(vec),max(vec)) 1*!upper.tri(m1) #or ?m1[!upper.tri(m1)] <-? rep(rep(1,length(vec)),vec) #But, in a case like below, perhaps: vec1<- c(3,4,5) ?m2<- matrix(0,length(vec1),max(vec1)) ?indx <- cbind(rep(seq_along(vec1),vec1),unlist(tapply(vec1,list(vec1),FUN=seq),use.names=FALSE)) m2[indx]<- 1 ?m2 #???? [,1] [,2] [,3] [,4] [,5]
2013 Jan 03
4
Index out SNP position
Dear R experts, I have 2 matix: A& B. I am trying to index B against A - (1) find out B rows that fall between the col 1 and 2 of A& put them into a new vector SNP.I made code as below, but I cannot think of a right way to do it. Could anyone help me with the code? Thanks,Jiang---- A <-
2005 Sep 01
1
More block diagonal matrix construction code
Folks: In answer to a query, Andy Liaw recently submitted some code to construct a block diagonal matrix. For what seemed a fairly straightforward task, the code seemed a little "overweight" to me (that's an American stock analyst's term, btw), so I came up with a slightly cleaner version (with help from Andy): bdiag<-function(...){ mlist<-list(...) ## handle case in
2013 Oct 04
3
Trying to avoid nested loop
Dear R users. I'm trying to avoid using nested loops in the following code but I'm not sure how to proceed. Any help would be greatly appreciated. With regards,Phil X = matrix(rnorm(100), 10, 10) ## Version with nested loopsresult = 0 for(m in 1:nrow(X)){ for(n in 1:ncol(X)){ if(X[m,n] != 0){ result = result + (X[m,n] / (1 + abs(m - n))) } }} ## No loop-sum(ifelse(M
2012 Mar 09
1
index values of one matrix to another of a different size
> Hello, > > Is this the fastest way to use indices from one matrix to reference rows > in another smaller matrix? I am dealing with very big data (lots of columns > and I have to do this lots of times). > > ######sample data ############## > vals = matrix(LETTERS[1:9], nrow=3,ncol=3) > colnames(vals) = c('col1','col2','col3') > rownames(vals)
2009 Jul 04
5
matrix problem
Can anybody please tell me a good way to do the following? Given a vector, number of rows and number of columns, return a matrix as follows. Easiest to give an example: x=c(1,2), nrow=5, ncol=4 return the matrix: 1 0 0 0 2 1 0 0 0 2 1 0 0 0 2 1 0 0 0 2 Thanks very much for any help! Bill
2006 May 26
2
combinatorial programming problem
Hola! I am programming a class (S3) "symarray" for storing the results of functions symmetric in its k arguments. Intended use is for association indices for more than two variables, for instance coresistivity against antibiotics. There is one programming problem I haven't solved, making an inverse of the index function indx() --- se code below. It could for instance return the
2012 Nov 18
1
identical matrices
Dear R users, I want to check matrices when i change the order of the rows or/and the order of the columns or/and the combination of them i will give an example what i want  1  -1  1  1      1  1   1  1 -1  -1 -1 -1    -1 -1  -1  -1   1  1    1  1     1 -1    1   1 these 2 matrices are identical because i change the first row and make it third   1  -1  1  1      -1  1   1  1 -1  -1 -1
2004 Apr 24
4
Moving window regressions - how can I improve this code?
I wrote a function which does "moving window" regressions. E.g. if there are 100 observations and the window width is 50, then I first run the regression for observations 1..50, then for 2..51, and so on. I am extremely pleased with R in my experience with writing this, since I was able to pass the model as an argument into the function :-) Forgive me if I sound naive, but that's
2009 Nov 17
2
SVM Param Tuning with using SNOW package
Hello, Is the first time I am using SNOW package and I am trying to tune the cost parameter for a linear SVM, where the cost (variable cost1) takes 10 values between 0.5 and 30. I have a large dataset and a pc which is not very powerful, so I need to tune the parameters using both CPUs of the pc. Somehow I cannot manage to do it. It seems that both CPUs are fitting the model for the same values
2010 Jan 21
1
Estimation of S.E. based on bootstrapping (functions with two or more arguments)
Hi all, I need to estimate S.E. of a certain indicator. The function to compute the value of indicator contains two arguments. Can anybody tell me how to do it? Example: We have data: a <- c(1:10) b <- c(11:20) data <- data.frame(a, b) Function to compute value of the indicator: indicator <- function(X, Y) sum(X)/(sum(Y)*2) Next I need to do the
2013 Jun 26
3
match rows of R
Hi all, What would be an efficient way to match rows of a matrix to a vector? ex: m<-matrix(1:9, nrow=3) m [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 ################################# which(m==c(2,5,8)) # I want this to return 2 ###################### Thanks, Sachin [[alternative HTML version deleted]]
2005 May 06
4
Choices from a matrix
Could someone please suggest a more clever solution to the following problem than my loop below? Given X a 2xN matrix X, and I a k-subset of N, Generate the (2^k)xN matrix Y with columns not in I all zero and the other columns with all choices of an entry from the first or second row of X. For example, with X <- matrix(1:8, nrow=2) I <- c(1,3) X is 1 3 5 7 2 4 6 8 and Y should be 1 0 5
2006 May 12
2
Help In Function
Hi All, I need a basic help from you. I've built a function like this, windowlength<-function(x) { z <- rep(seq(0,331,by=x-1)+1, each=2) zz <- z[-c(1,length(z))] ind <- as.data.frame(matrix(zz, nr=2)) j<-lapply(ind, function(x) mat[x[1]:x[2],]) cat("For",x/4,"month