similar to: Listing all possible samples of size n form a population of size N

Displaying 20 results from an estimated 7000 matches similar to: "Listing all possible samples of size n form a population of size N"

2005 Dec 08
3
Finding all possible partitions of N units into k classes
Dear useRs! I would like to generate a list of all possible (unique) partitions of N units into k classes. For example, all possible partitions of 4 units into 2 classes are (I hope I have not missed anyone): 1,1,1,2 (this can be read as {1,2,3},{4}) 1,1,2,1 1,2,1,1 2,1,1,1 1,1,2,2 1,2,1,2 1,2,2,1 The partitions 1,1,2,2 and 2,2,1,1 are the same and are therefore not two unique
2006 Jan 11
3
Regular expressions
Matching regular expressions Dear useRs! I have the following problem. I would like to find objects in my environment that have two strings in it. For example, I might want to find objects that have in their names "MY" and "TARGET". I do not care about the ordering of these two substrings in the name, neither what is in front, behind or between them, the only thing important
2005 Dec 22
1
Problems with passing ... to a function
Dear useRs! I have written a function that should pass argument "m" to the next function, however it does not! Please have a look at the function below that shows a problem and tell me what I am missing. As you can see, the "blocks" argument is passed corectly, while "m" is not. Best, Ales Ziberna opt.par.new<-function( #function for optimizig
2006 Jan 04
2
Putting an object in to a function that calls the current function
Hello! I would like to put an object in to a function that calls the current function. I thought the answer will be clear to me after reading the help files: ?assign ?sys.parent However it is not. Here is an example I thought should work, however it dose not exactly: f<-function(){s();print(a)} s<-function()assign(x="a",value="ok",pos=sys.parent()) f() #I want to get
2006 Jan 13
3
Taking code from packages
Hello! I am currently in the process of creating (my first) package, which (when ready) I intend to publish to CRAN. In the process of creating this package I have taken some code form existing packages. I have actually copied parts of functions in to new functions. This code is usually something very basic such as Rand index. What is the proper procedure for this? Since most of R (and also the
2005 Aug 26
3
Free-form to fixed-form Fortran
Hello! I have writen some subrutines in Free-form Fortran. I would like to includ them in a package, which I would like to build on WinXP. I have all suggested tools/programs for bulding R packages on Windows (except latex). What is the best way of using these subrutines? Does sombody mybe know any translation tools for converting Free-form to fixed-form Fortran? Thanks for any suggestions,
2005 Dec 14
2
The fastest way to select and execute a few selected functions inside a function
Dear useRs? I have the following problem! I have a function that calls one or more functions, depending on the input parameters. I am searching for the fastest way to select and execute the selected functions and return their results in a list. The number of possible functions is 10, however usually only 2 are selected (although sometimes more, even all). For examples, if I have function
2005 Aug 13
2
Problems runing R CMD check
Hello! I have a problem checking the package. Firstly, I do not know how to specify the package to check. I tied specify it by supplying the path and by runing the R CMD check in the directory of the package. In addition to that, I get an error bellow. Any suggestions on how to set TMPDIR would be greatly appriciated! C:\Ales\Statistika\Blocno modeliranje\dr\blockmodeling>R CMD check *
2005 Nov 24
4
Survreg Weibull lambda and p
Hi All, I have conducted the following survival analysis which appears to be OK (thanks BRipley for solving my earlier problem). > surv.mod1 <- survreg( Surv(timep1, relall6)~randgrpc, data=Dataset, dist="weibull", scale = 1) > summary(surv.mod1) Call: survreg(formula = Surv(timep1, relall6) ~ randgrpc, data = Dataset, dist = "weibull", scale = 1)
2006 Feb 21
2
Convertin rows of a matrix to a list
Hello! I would like to convert rows of a matrix to a elements of a list. #For example, if I have mat<-matrix(1:100,ncol=5, nrow=20) #I can do: list<-apply(mat,1,list) list #however this is not quite what I want. To get what I want, I have to do: list<-lapply(list,function(x)x[[1]]) list Is there a faster way? Best regards, Ales Ziberna
2006 Mar 13
1
Building help pages
Hello! I was just wondering, why only one of my "Rd" files is converted in "chm" format (REGE) and the other are not when installing a package? The output from installing a package on WinXp is below. I tried to find more information about what "chm" format actually is, however have found none. Best regards and thaks for any replies, Ales Ziberna
2004 Oct 26
1
putting legend outside ploting region
Hello! I have created a plot and would like to put a legend in the top left corner (above and left of plotting region), but non of the functions can plot there (I tried 'legend', 'text', 'points', 'lines', 'mtext', 'axes',...). I would be very grateful if someone could help me put something in that corrner, with any fuction. Thanks, Ales Ziberna
2004 Nov 02
3
Using East-european characters in R
Does anybody know how to produce a East-European character "??" - "c with a v-shaped hat " in R (in text or plot)? I do know how to get "??,??" - "s,z, with a v-shaped hat", but not this one. Thanks in advance for any suggestions, Ales Ziberna P.S.: I am using Windows XP and R version 1.9.1 (details below) $platform [1]
2005 Dec 08
0
Finding all possible partitions of N units into k classe
See Also http://finzi.psych.upenn.edu/R/library/caTools/html/combs.html Jarek Tuszynski -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] Sent: Thursday, December 08, 2005 11:19 AM To: Ales Ziberna Cc: R-help Subject: Re: [R] Finding all possible partitions of N units into k classe On 08-Dec-05 Ales Ziberna wrote: > Dear
2005 Jan 11
2
Changes in expression in R 2.0.1
Hello! plot(1:10,main=expression(1 <= "m" <= 5)) The above command works perfectly in R 1.9.1 but returns an error in R 2.0.1 This is documented in NEWS for R 2.0.0 (or ONEWS in R 2.0.1) and it is said: o R no longer accepts associative use of relational operators. That is, 3 < 2 < 1 (which used to evalute as TRUE!) now causes a syntax error. If this
2005 Aug 02
1
Putting all elementes of the list in an enviorment of a function
Hello! I have two functions. The first one prepares the arguments for the second one. What is the best way to put all resoults of the first one into the second one? I tried attach, however the object in the "main" enviorment have a priority over the ones in list. An example is at the end. Thanks in advance for any suggestions! Ales Ziberna For example - I would like to use just
2006 Jan 30
2
R on dual-core machines
Dear expeRts! I'm thinking of buying a new computer and am considering dual-core processors, such as AMD Athlon64 X2. Since I'm not a computer expert, pleas forgive me if some of my questions are silly. First, am I correct that using a dual-core processor is (for R point of view) the same as using a computer with two processors? If that is true, the posts I found on the list imply that
2008 May 26
1
Listing all possible samples of Size two form Large Population
Respected All, I need some efficient program or package to draw all possible samples of size two without replacement. I am using "combinat" package to list all possible samples but it hangs my computer for larger populations say 10,000 (i.e. 49995000 all possible samples). I wish to even work for larger populations then this and replicate this procedure for many times. Kindly can anyone
2005 Aug 23
5
TCITex and R
Several times my packages have fallen foul of the latex check at the uploading-to-CRAN stage, creating extra work for Kurt Hornik. I've never bothered trying to get latex working on my own packages (happy with vanilla help) but am told that "latex is the closest thing to a syntax checker for Rd files" and that I should set it up. Now, there is already a latex on my (Windows XP)
2004 Oct 27
4
ploting axes and rotating strings
Hello! I have two question that rose from trying to tacle the same problem in two differnet ways. What I want to do is to plot axes (only values or labels, no tick marks) in such a way that 'cex' can be very small, text can be perpendicular to the axis (as in axis(las=2) ) and the text is stil at the right position. Let me demonstrate with a small example: