similar to: How sample without replacement on more than one variables?

Displaying 20 results from an estimated 30000 matches similar to: "How sample without replacement on more than one variables?"

2010 Sep 27
2
Sample size estimation for non-inferiority log-rank and Wilcoxon rank-sum tests
Hello Everyone,   I'm trying to conduct a couple of power analyses and was hoping someone might be able to help. I want to estimate the sample size that would be necessary to adequately power a couple of non-inferiority tests. The first would be a log-rank test and the second would be a Wilcoxon rank-sum test. I want to be able to determine the sample size that would be necessary to test for a
2007 Dec 17
2
more structure than 'str'?
How can I see more of the structure than displayed by 'str'? Consider the following: tstDF <- data.frame(a=1, row.names='b') > str(tstDF) 'data.frame': 1 obs. of 1 variable: $ a: num 1 The object 'tstDF' has row.names, but I have to suspect they are there -- AND know a function like 'row.names' or 'dimnames' -- to see
2018 Mar 15
1
[GSoC 2018] Integrate with Z3 SMT solver to reduce false positives.
Hi all, I am a fourth year EE bachelors student who is very interested in compilers. I have taken the only compilers course offered in my school and did an independent study with my CS professor. Although I'll begin to work in a couple of months, I definitely want to pursue my interest in compiler design and optimization as a PhD in the future. I am very interested in the z3 SMT solver
2010 Jul 07
2
How not to print '\\' as '\\'
Hello All, '\\' is printed as '\\', but it is actually only one character. Sometimes, I'd rather print it as a single '\'. Is there a function to do so in R? > nchar('\\') [1] 1 > print('\\') [1] "\\" -- Tom
2011 Apr 13
2
How to get the names of all the packages that depend on a give package?
Dear All, I want to check what packages depends on a given package. For example, glmnet depends on Matrix. I want get the names of all the packages that depend on Matrix on CRAN. Is there a way to do so? Thanks! > library(glmnet) Loading required package: Matrix Loading required package: lattice -- Tom
2011 Aug 08
2
enclosing with() in a function
Hi All, I want to enclose with() in a function mean_on_element. Obviously, it is not working. The problem is how to specify the element name with a function body. Does anybody have any suggestion? Thanks! > data=list(x=1:10) > with(data, mean(x)) [1] 5.5 > > mean_on_element=function(data, elem_name) { + with(data, mean(elem_name)) + } > mean_on_element(data, 'x') [1] NA
2010 Jul 07
3
Weired problem when passing arguments using ...?
Hello All, I'm trying to pass the argument col.names to write.csv using '...'. But I got the following warnings. Maybe it is very simple. But I'm not sure what I am wrong. Could you please help point to me what the problem is? ##################### fun=function(x, ...) { fr=parent.frame() tmp=get(x, envir=fr) write.csv( tmp , file=paste(x, '.csv',
2010 Aug 05
2
a question about 'read.table' with or without 'read.table'.(urgent)
Hi, I've got a quite tricky question. I have a txt file, named 'temp.txt', as the following: snp1 snp2 snp3 AA 00 00 GG GG 00 00 AA 00 I want to read the file into R. 1) when I use 'read.table' without 'header=T' option, > temp <- read.table('temp.txt') # I got > temp V1
2010 Jul 14
2
How to define a function (with '<-') that has two arguments?
Hi All, The last line if the following code returns the error right below this paragraph. Essentially, I use the operator %:% to retrieve a variable in a nested frame. Then I want to use the same operator (with '<-') to change its value. I'm not sure if this is possible in R with %:% operator. Would you please help and let me how to correct the code if it is possible? Error in
2004 Dec 10
3
Asterisk Training Needed in SouthEast U.S
I need advanced Asterisk training in the SouthEast area of the U.S; I don't need to know how to install linux and Asterisk and compile the modules and load them and such. I don't need to know what extensions.conf does or sip.conf does; What I do need is a better understanding of what every single little option in sip.conf or iax.conf does, and I need to learn a lot more about all the
2010 Nov 17
0
[LLVMdev] Is it possible to run llvm on mips machine?
Hi, There are numerous emails flying around the list at the moment regarding the state of the JIT. In its current state it is infeasible to add support for another architecture (very difficult to say the least) - there are plans currently being formulated to deal with this and convert the JIT to the new MC architecture, which would allow much easier porting between platforms. Have a look for the
2011 May 05
1
[LLVMdev] Could LLVM or Clang go backward to modify c source code?
OK. Thank you. What I want to do is: Fix source code in-place, then feed it to compiler normally. I assume I can fix source code in-place using clang::SourceManager, but I cannot find the appropriate API. Now I know that way is infeasible. Thanks again. 2011/5/5 Joshua Warner <joshuawarner32 at gmail.com> > Wen-Han, > > It sounds like there are two problems here: first is
2004 Sep 22
1
Sample without replacement
Hello, I have a simple problem (checked the archives and the appropriate help pages, to no avail). I want to creat a vector that is length(2000). The vector is to consist of two strings( "std" and "dev") with 1760 "std"s and 240 "dev"s. Furthermore, for each element of the vector, i want the selection of one of the strings to be approx. random. The
2011 Aug 23
1
Help: Sort components of a vector with indices tracked in R
Dear All, I would like to know how to sort a vector of numeric values such that we know the original index of each ordered component. Say, we have c <- c(1,4,3,2) csort <- sort(c,descreasing=FALSE) With a few components of c, we can manually find out: csort[1] = 1 = c[1], ie, the original index of csort[1] is 1, csort[2] =2 =c[4], ie, the original index of csort[2] is 4. When length(c) is
2010 Nov 17
2
[LLVMdev] Is it possible to run llvm on mips machine?
On Wed, Nov 17, 2010 at 4:30 PM, James Molloy <James.Molloy at arm.com> wrote: > Hi, > > There are numerous emails flying around the list at the moment regarding the state of the JIT. In its current state it is infeasible to add support for another architecture (very difficult to say the least) - there are plans currently being formulated to deal with this and convert the JIT to the
2017 Oct 18
0
uniform sampling without replacement algorithm
Splus used a similar method for sampling from "bigdata" objects. One problem was that sample() is used both for creating a sample and for scrambling the order of a vector. Scrambling the order of a big vector wastes time. It would be nice to be able to tell sample() that we don't care about the order. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Oct 17, 2017 at 10:55
2018 May 10
3
Using C++14 code in LLVM
On Thu, May 10, 2018 at 3:10 PM Zachary Turner <zturner at google.com> wrote: > On Thu, May 10, 2018 at 1:50 PM Chandler Carruth via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Last time this came up, there were a lot of people that were stuck on GCC >> 4.9 due to ABI reasons. I think forcing that upgrade is going to be the >> most disruptive part
2017 Oct 17
4
uniform sampling without replacement algorithm
Let us consider the current uniform sampling without replacement algorithm. It resides in function do_sample in https://svn.r-project.org/R/trunk/src/main/random.c Its complexity is obviously O(n), where the sample is selected from 1...n, since the algorithm has to create a vector of length n. So when the sample size is much lesser than n, the algorithm is not effective. Algorithms with
2012 Feb 15
2
Control number of assets in resulting portfolio with optimizations using package fPortfolio
Dear All, I am using package fPortfolio to run minimum variance portfolio optimizations in R. I already know how to set portfolioSpecs, portfolio objects and constraints. Unfortunately I am not able to set the following type of constraints. I have a timeSeries object with returns data for roughly 1.5k assets for 261 subperiods (workingdays) and want to compute the global minimum variance
2011 Aug 19
3
ATSP to TSP reformulation
Greetings, I am having trouble getting the function reformulate_ATSP_as_TSP to work for me. I have provided a simple example of some of the code I've been using. In particular, I'm not sure why I'm getting the error "Error in dimnames(tsp) <- list(lab, lab) : length of 'dimnames' [1] not equal to array extent" since I created the object ATSP with a valid