similar to: permutate elements in a vector

Displaying 20 results from an estimated 2000 matches similar to: "permutate elements in a vector"

2010 Feb 22
2
change email subscription
Dear R team, As this is a university email address with very small inbox limit, can I please change my R email subscription to another email address instead of this one? My new email address is wendy2.qiao@gmail.com. I have change my email in my profile, but seems that does not change my subscription. Thank you. Wendy [[alternative HTML version deleted]]
2011 Apr 10
3
count number of TRUEs in each row
Hi all, I have a huge matrix of TRUE/FALSE table like following, and I want to count the number of TRUEs in each row. Instead of looping through each row and do length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. [,1] [,2] [,3] [1,]TRUE FALSE FALSE [2,]FALSE TRUE TRUE Thank you in advance. Wendy -- View this message in context:
2009 Oct 10
1
permutations
Question 1. I would calculate all the permutations of numbers (23,46,70,71,89) How can I write correctly the code? (Load gregmisc) > permutations (..?...) ______________________ Question 2. It's possible permute a string? ..for example: EIGER EGIER EREGI etc..etc.. Thanks, E. -- View this message in context: http://www.nabble.com/permutations-tp25834463p25834463.html Sent from the R
2011 Nov 01
4
round up a number to 10^4
Hi all, I have a list of numbers, e.g., X = c(60593.23, 71631.17, 75320.1), and want to round them so the output is Y = c(60000, 80000, 80000). I tried Y<-round(X,-4), but it gives me Y = c(60000, 70000, 80000). Do anybody know how to round up a number to 10^4? Thank you in advance. Wendy -- View this message in context:
2006 May 08
3
Non repetitive permutations/combinations of elements
Hello all, I am trying to create a matrix of 1s and -1s without any repetitions for a specified number of columns. e.g. 1s and -1s for 3 columns can be done uniquely in 2^3 ways. -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 1 1 and for 4 columns in 2^4 ways and so on. I finally used the function combn([0 1],3) that I found at the following link
2011 Nov 01
2
annotate histogram
Hi all, I want to make a histogram like the one show http://nar.oxfordjournals.org/content/39/suppl_1/D1011/F1.expansion.html here , but I did not figure out how to add the red marks at the bottom of the bars. Could anybody help? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/annotate-histogram-tp3963960p3963960.html Sent from the R help mailing list archive
2010 Jan 18
2
permutations from vectors out of a matrix
Dear R-Users, I'm relativley new to R and have the following problem. I need all permutations of the vectors created by the collumns of a matrix. I will give a small example: p=3 n=2^p-1 #number of obtainable vectors mat=matrix(0,p,p) for(i in 1:p) { mat[i:1,i]=1/i } mat is now a
2010 Feb 21
4
replicate matrix
Hi all, I have a matrix, for example [,1] [,2] [1,] 1 3 [2,] 4 6 I want to replicate the matrix twice and add an extra column at the end, which is [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 3 1 3 1 3 2 [2,] 4 6 4 6 4 6 5 I found 'rep' only works for vector. Does anyone know how to replicate a matrix, and append the matrix?
2008 Apr 06
3
Multiset Permutations
Dear R users, I want to perform an exact permutation of multisets. I have looked at the coin package, but it doesn't seem to offer what I am looking for. I want to perform permutations (exact - without duplications) on multisets of scalars (e.g., the multiset 0,0,1,2,2). I want to output all the possible permutations into a data frame so that each multiset permutation occupies a row (or
2010 Feb 20
1
coerce (list) object to type 'double'
Dear all, I am really new to R, and I have problem here. I searched around, but did not get a solution. I have a numetrix matrix (20 by 25) saved in .csv. I read it as >sx<-read.csv("sx.csv",header=F) Then I try to convert it to numeric using >sx<-as.numeric(sx) Error: (list) object cannot be coerced to type 'double' The class of sx is "data.frame". I
2006 Aug 18
1
Permutations with replacement
Is there a simple function or process that will create a matrix of permutations with replacement? I know that using the combinat package ###### begin R code ###### > library(combinat) > m <- t(array(unlist(permn(3)), dim = c(3, 6))) # we can get the permutations, for example 3!=6 # gives us > m [,1] [,2] [,3] [1,] 1 2 3 [2,] 1 3 2 [3,] 3 1 2 [4,]
2006 Aug 02
2
listing of permutations
Dear R People: Suppose I have the 4 numbers: 1,2,3,4. I would like to create a listing of the permutations of 4 items taken 4 at a time. Is there a built in function for that, please? Thanks in advance! R 2-3-1 for Windows or Linux Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodgess at gator.uhd.edu
2009 Aug 11
1
Help on a combinatorial task (lists?)
Hello! I have the following combinatorial problem. Consider the cumulative sums of all permutations of a given weight vector 'w'. I need to know how often weight in a certain position brings the cumulative sums equal or above the given threshold 'q'. In other words, how often each weight is decisive in raising the cumulative sum above 'q'? Here is what I do: w <-
2012 Sep 11
2
Sort or Permutate
Dear all, I am having a struct that contains on the first column file names and on the second column a number which is a "rating" of the file on first column A small subset looks like that small      [,1]                                                                                                                                                                 [1,]
2006 Sep 18
7
smb.conf
Hi all My client want a shared folder so that only two people can access and write to it. I added the following to my smb.conf [private] writeble = yes guest ok = no path = /home/samba/private valid users = wendy, pierre write list = wendy, pierre force user = nobody All i need yo do now is make the folder "private" to nobody. How would i go on by doing that and would this work.
2008 Dec 05
1
Lexical Permutation Algorithm in R
Hi all Here is a rather naive implementation of the SEPA algorithm for generating lexical permutations: lexperm3 <- function(x, n=length(x)) { perms <- list() k <- 1 perms[[k]] <- x k <- k + 1 for (y in 1:(factorial(n)-1)) { i <- n-1 while (x[i] > x[i+1] && i > 0) { i <- i - 1 } # i is largest index st x[i] > x[i+1] j <- n #
2015 Mar 22
2
Combinatoria
Hola Miguel, Sí se pueden obtener las variaciones con y sin repetición en R. Eso sí están un poco escondidas... Se pueden calcular de esta forma: #---------------------- > #Cargar el paquete gtools > library(gtools) > #Definir el conjunto sobre el que se hará el cálculo > x <- c('rojo', 'azul', 'verde') > #Utilizar la función "permutations()"
2011 Oct 30
3
element-by-element comparison
Hi, I have a vector and a matrix. For example, A = [ 12 3 4]; B = [ 4 13 10 2 4 8]; I am comparing A to each column of B using A>B[,ii], so the expected result is C = [ 1 0 0 1 0 0]; I am looking for a way to do this quickly instead of going through the for loop, but haven't had any luck yet? Any advice is appreciated. Thank you very much. Wendy
2010 Nov 28
2
weighted x variables with glm
I have a glm regression (quasi-poisson) of log(mu) on x but I have varying degrees of confidence in the x values, and can attach a numerical weighting to each. Can anyone help me with suggestions of how to analysise this. Is there an R package that would help? Wendy [[alternative HTML version deleted]]
2011 Aug 31
2
How to expand LVM without create new drive?
I now how to expand a LVM by creating a new drive as described here: http://lists.centos.org/pipermail/centos/2007-February/032664.html, the steps are: # pvcreate /dev/sda3 # vgextend VolGroup00 /dev/sda3 Now, I want to know how to expand a LVM without create /dev/sda3? Suppose I have 2 GB free (unpartitioned) and LVM use /dev/sda2 (8 GB). How to make /dev/sda2 become 10 GB? Then resize LVM