similar to: generate combination multiset (set with repetition)

Displaying 20 results from an estimated 1000 matches similar to: "generate combination multiset (set with repetition)"

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
2007 May 14
1
Problem with R CMD BATCH on R-2.5.0 due to Sys.unsetenv not available
Hello, I am working on an unix SunOS machine ( sun4u sparc) and since the last release of R -R version 2.5.0 (2007-04-23) - , I have got troubles during the execution of batch command. For example with the instruction file multic.in >cat multic.in install.packages("multic","/bge/penel/R_install/R_2.5.0/lib/R/library",repos="http://cran.at.r-project.org")
2011 Mar 25
0
applying random functions to multisets
Hi, I am solving following problem: Suppose I have some multiset: > multiset <- c("a","a","c","d","d") and rules, which operate with it (for simplicity not writen in R functions) > rule1: "a" -> c("a","b") > rule2: "a" -> c("a","c") > rule3: "c" ->
2008 Aug 15
2
Combination with repetition
Hi there! I can't find any information about creating combinations with repetitions in R. The function combn() does create combinations, but _without_ repetitions. Here is what I need to do: svIter <- 1000 xx <- matrix(rnorm(m*n), c(m, n)) sequence <- seq(range(xx)[1], range(xx)[2], length.out = svIter^(1/q)) expand.grid(secuence, secuence, .../q times/..., secuence) That is,
2009 Jan 26
1
PCALG Package
Hi all, Can anyone help me setup this package so I can use it. I am getting errors with the Rgraphviz package and have tried a number of ways to get this to work. Any help will be greatly appreciated! I am sorta new to R but have been actively trying to get into using it as my main analysis software. Thanks, Brock [[alternative HTML version deleted]]
2013 Jan 04
1
SpatialPolygon with the max value gets no color assigned in spplot function when using "at" parameter
Hi, I would like to do coloring of map regions based on the region values "weight". The approach I am taking is first to break regions into equal intervals, classIntervals(spdf$weight,4)$brks #4 intervals in this case and coloring all regions within the interval with the same color col = brewer.pal(4,"RdYlGn")) The max "weight" is as well the boundary of the
2019 Mar 03
2
bug: sample( x, size, replace = TRUE, prob= skewed.probs) produces uniform sample
When `length( skewed.probs ) > 200' uniform samples are generated in R-devel. R-3.5.1 behaves as expected. `epsilon` can be a lot bigger than illustrated and still the uniform distribution is produced. Chuck > set.seed(123) > > epsilon <- 1e-10 > > ## uniform to 200 then small > p200 <- prop.table( rep( c(1, epsilon), c(200, 999-200))) > ## uniform to 201
2018 Mar 30
3
getting all circular arrangements without accounting for order
Dear friends, I would like to get all possible arrangements of n objects listed 1:n on a circle. Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1) from the gtools package. However, what if clockwise or counterclockwise arrangements are the same? I know that half of the above (n - 1)! arrangements are redundant. Is there an easy way to
2010 Sep 16
2
use same breaks and colors, but the displayed scale are different-image.plot()
Hi all, I want to put several figures in a one figure for easy comparison, so i need to use the same methods to plot these figures. The following is an example. I also list my method, but it does not work. #Example data x<- 1:10; y<- 1:10; z<- outer( x,y,"+");z2<- outer( x,y,"-") #Quick view them image.plot(x,y,z) #relatively larger value image.plot(x,y,z2)
2007 Sep 27
5
New R website: R-Cookbook.com
R Community, I've put together a website that I thought this mailing list might be interested in: http://www.r-cookbook.com It's a (free) community-driven content management system for R "recipes", or working examples. Some of the features of the site are code highlighting, recipe ratings, recipe comments, personal "recipe boxes" to save your favorite
2012 Oct 17
2
loop of quartile groups
Greetings R users, My goal is to generate quartile groups of each variable in my data set. I would like each experiment to have its designated group added as a subsequent column. I can accomplish this individually with the following code: brks <- with(data_variables, cut2(var2, g=4)) #I don't want the actual numbers, I need a numbered group data$test1=factor(brks,
2006 Nov 07
2
wrong fill colors in polygon-map
Dear all, I would like to produce a map with information about the patenting activity in German districts, by coloring districts with different degrees of patenting activity in different colors. I work with the packages maptools, maps and spdep. The map data is read from an external .shp file (+ the corresponding .shx and .dbf files). Plotting a map with the IDs or the patenting indicator itself
2018 Mar 30
3
getting all circular arrangements without accounting for order
Thanks! Yes, however, this seems a bit wasteful. Just wondering if there are other, more efficient options possible. Best wishes, Ranjan On Thu, 29 Mar 2018 22:20:19 -0400 Boris Steipe <boris.steipe at utoronto.ca> wrote: > If one is equal to the reverse of another, keep only one of the pair. > > B. > > > > > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra
2009 Feb 07
3
New package test results available
We've added a column at http://cran.r-project.org/web/checks/check_summary.html of test results using the Sun Studio compiler: it is intended that these will be updated weekly. The Sun Studio compiler is that used on Solaris: these runs were on the Linux version. All the other platforms are using gcc 4, so this provides an opportunity for checking for use of gcc-specific features and
2011 Nov 29
1
Hmisc break points error
I am making frequency histograms using the histbackback function on my 2 datasets. However when I try to use the brks function: foo<-histbackback(log(fie11), log(fie86),ylim=c(0,9),probability=FALSE,axes=TRUE,ylab=("log10 Parcel Size"),brks=16) The graphic results in a 'NA' label for the y axis (no intervals are returned) Also when I use 'summary(foo)' the
2009 Jun 26
1
predicted values after fitting gamma2 function
Question: after fitting a gamma function to some data, how do I get predicted values? I'm a SAS programmer, I new R, and am having problems getting my brain to function with the concept of "object as class ...". The following is specifics of what I am doing: I'm trying to determine the pdf from data I have created in a simulation. I have generated frequency counts
2018 Mar 30
0
getting all circular arrangements without accounting for order
If one is equal to the reverse of another, keep only one of the pair. B. > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra <maitra at email.com> wrote: > > Dear friends, > > I would like to get all possible arrangements of n objects listed 1:n on a circle. > > Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1)
2009 Aug 11
1
nested repeated measures MANOVA using adonis
I am trying to apply a permuation-based MANOVA (Anderson 2001) to a set of morphological data from three ecomorphs of fish reared under two different conditions and measured at two points during ontogeny. I will supply a distance matrix based on Procrustes distances calculated outside of vegan. I have not found an example of a design such as this for adonis. However, I have designed my factors
2008 Jul 29
3
table questions
Hi again! Suppose I have the following: > xy <- round(rexp(20),1) > xy [1] 0.1 3.4 1.6 0.4 1.0 1.4 0.2 0.3 1.6 0.2 0.0 0.1 0.1 1.0 2.0 0.9 2.5 0.1 1.5 0.4 > table(xy) xy 0 0.1 0.2 0.3 0.4 0.9 1 1.4 1.5 1.6 2 2.5 3.4 1 4 2 1 2 1 2 1 1 2 1 1 1 > Is there a way to set things up to have 0 - 0.4 0.5 - 0.9 etc. please? I know there is the cut
2017 Jun 18
3
R_using non linear regression with constraints
I am not as expert as John, but I thought it worth pointing out that the variable substitution technique gives up one set of constraints for another (b=0 in this case). I also find that plots help me see what is going on, so here is my reproducible example (note inclusion of library calls for completeness). Note that NONE of the optimizers mentioned so far appear to be finding the true best