similar to: permutations from vectors out of a matrix

Displaying 20 results from an estimated 3000 matches similar to: "permutations from vectors out of a matrix"

2009 Dec 20
3
How to rotate an axis?
Hi everybody, I'm trying to build a trilineare coordinate system with R. For that, I need to rotate an axis. Does anybody know, if it is possible to rotate an axis, created with the command axis(), about for instance 60 degrees? I'm looking foward to any ideas and hints and want to wish everybody a merry merry christmas. Thanks in advance. Etienne Stockhausen
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
2010 Jun 28
2
Using if statement on function
Hello everybody, I'm trying to use a if-statment on a function. For a better understanding I want to present a small example: FUN=mean # could also be median,sd or any other function if (FUN == mean) plot(...) if (FUN == median) plot(...) ... This doesn't work, because FUN is a function. I've already tried to coerce the
2010 Aug 09
2
How to extract the conf.level out of t.test() data
Good afternoon everybody, I'm writing a little function to visualise hypothesis testing. Therefore I need to extract the confidence level of a t-test. Here a little example: x <- str(t.test(1:10) gives List of 9 $ statistic : Named num 5.74 ..- attr(*, "names")= chr "t" $ parameter : Named num 9 ..- attr(*, "names")= chr
2011 May 24
2
Problem with visualization of power of t test
Dear R-User, I'm trying to visualize the results of the power calculation with the function power.t.test(). Therefore I want to plot the related t-distributions and shade the surfaces indicatingt the type I error, the type II error and the power. For sample sizes greater 30 I got results which are very satisfying. For small sample sizes I got stuck and did'nt find a mistake. To show you
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
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,]
2010 Jan 12
2
Making routine faster by using apply instead of for-loop
Hey everybody, I have a small problem with a routine, which prepares some data for plotting. I've made a small example: c=10 mat=data.frame(matrix(1:(c*c),c,c)) row.names(mat)=seq(c,1,length=c) names(mat)=c(seq(2,c,length=c/2),seq(c,2,length=c/2)) v=as.numeric(row.names(mat)) w=as.numeric(names(mat)) for(i in 1:c) { for(j in 1:c) {
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 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
2010 Jan 08
1
Using outer with function predict
Hey everybody, I have a problem with the combination of the commands outer() and predict(). I want to visualize the solutions of a regression modell in a matrix. Therefore I want to use the command predict for a linear modell as the function inside the command outer. I've made a small example: x = 1:10 y = 11:20 z = rnorm(10) lm.1 = lm(z ~ x*y)
2010 Nov 08
2
Visualization of histograms
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101108/60bbf91d/attachment.pl>
2011 Dec 01
2
permutate elements in a vector
Hi all, I have a vector, e.g., A = c(10, 20, 30, 40). This 4 numbers have 4! = 24 different combination. I want to generate a matrix with one combination in one row, so the output would be B = 10 20 30 40 10 40 20 30 ... Does anyone know how to do this easily in R? Thank you very much. Wendy -- View this message in context:
2011 Mar 29
1
Pictures/ Graphics in rd-files
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110329/ec6a4e5d/attachment.pl>
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 Feb 07
2
units for mapproject() function result
Does anyone know what the units are for projected coordinates obtained using mapproj's mapproject function with an Albers projection? Thanks for any and all help! Buck Stockhausen *************************************************** * Dr. William T. Stockhausen * *************************************************** * Resource Ecology and Fisheries Management * *
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()"
2006 Mar 05
8
workflow support in Ruby on Rails
Hello, I am relativley new to Ruby on Rails and am still in the process of enjoying the features it offers. I wanted to know if theres workflow support in rails. Can some one give me pointers if its possible. Thanks Naveen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060305/43c9abc3/attachment.html
2015 Mar 22
2
Combinatoria
Sí, también... Para las permutaciones, n=r. Y con el parámetro "repeats.allowed" controlas si son con o sin repetción: #---------------------- > #Permutaciones *con repetición* > permutations(n=3, r=3, v=x, repeats.allowed=TRUE) [,1] [,2] [,3] [1,] "azul" "azul" "azul" [2,] "azul" "azul" "rojo" [3,]