similar to: sample.int() algorithms

Displaying 20 results from an estimated 80 matches similar to: "sample.int() algorithms"

2011 Apr 19
0
doSMP package works better than perfect, at least sometimes.
Some might have noticed that REvolution Computing released the doSMP package to the general public about a month and a half ago, which allows multiple cores to be accessed for parallel computation in R. Some of our physical habitat calculations were taking an extraordinary amount of time to complete and required over-weekend runs, which prompted our interest in this package. What follows
2019 Mar 01
1
issue with sample in R 3.6.0.
Hello, I think there is an issue in the sampling rejection algorithm in R 3.6.0. The do_sample2 function in src/main/unique.c still has 4.5e15 as an upper limit, implying that numbers greater than INT_MAX are still to be supported by sample in base R. Please review the examples below: set.seed(123) max(sample(2^31, 1e5)) [1] 2147430096 set.seed(123) max(sample(2^31 + 1, 1e5)) [1] 1
2012 Jul 13
1
functions of vectors : loop or vectorization
I have a read a lot about the benefits of vectorization in R. I have a program that takes "almost forever" to run. A good way to see if I have learned something ... My problem can be summarized like this : I have a nonlinear function of several variables that I want to optimize over one letting the other describe a family of curves. In short, I wan't to optimize f(x,a,b) for several
2009 Apr 26
3
3 questions regarding matrix copy/shuffle/compares
Hello all, I have the following function call to create a matrix of POP_SIZE rows and fill it with bit strings of size LEN: pop=create_pop_2(POP_SIZE, LEN) I have 3 questions: (1) If I did keep_pop[1:POP_SIZE] == pop[1:POP_SIZE] to keep a copy of the original data structure before manipulating 'pop' potentially, would this make a deep copy or just shallow? Ie
2008 Sep 29
4
RJS is not loaded
Hello, I have here an issue which is really critical for me (it for my university work and I would like to not delete this feature). It based on a Rails 1.x tutorial which I use now under Rails 2.x. It contains the refreshment (adding content or records) of an div via RJS/JS. I access the RJS via (Controller): respond_to do |format| format.html { redirect_to :controller =>
2010 Mar 11
2
Comparing matrices
Hello all, I have two matrices, pop and pop2, each the same number of rows and columns that I want to compare for equality. I am concerned about efficiency in this operation. I've tried a few things without success so far. Doing something simple like: if (pop==pop2) { cat('equal') } else { cat('NOT equal') } results in the warning: 1: In if (pop == pop2) { : the
2007 Nov 15
3
Ancova doesn't return test statistics
Dear all, I'm quite sure that this is a stupid question, but I'll ask anyway. I want to perform an ANCOVA with two continuous factors and three categorical factors. Plant population growth rate (GR) = dependent variable Seed reduction due to herbivory (SR) = continuous explanatory variable Herbivore species (HS, 2 levels) = categorical explanatory variable Population (Pop, 24 levels) =
2010 Jan 17
2
For loops in R
Hello. I've just started using R and am trying to figure out if the two codes snippets below have the same output gBest<-floor(runif(popsize,min=1,max=top)) velocity[i,j]<<-.4* velocity[i,j] + 1 * runif(1) * (pbestsVar[i,j] - popVar[i,j]) + 1 * runif(1) * (archiveVar[gBest,j] - popVar[i,j]) and for (i in 1:popsize) { for (j in 1:maxvar) { gBest<-sample(top,size=1)
2011 Dec 02
1
Error in Genetic Matching
Dear R Users, I am a novice learner of R software. I am working with Genetic Matching - GenMatch(), but I am getting an Error message as follows:  Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp,  :    GenMatch(): input includes NAs Could you please suggest me correcting the above problem? My GenMatch command is, > gen1 <- GenMatch(Tr = Tr, X =
2011 Dec 02
0
Error message in Genetic Matching
Dear R Users, I am a novice learner of R software. I am working with Genetic Matching - GenMatch(), but I am getting an Error message as follows:  Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp,  :    GenMatch(): input includes NAs Could you please suggest me correcting the above problem? My GenMatch command is, > gen1 <- GenMatch(Tr = Tr, X =
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2010 Mar 14
1
Segfault Problem c++ R interface (detailed)
Hello R Community, I've been working on a project that uses pre-made C++ libraries (using STL) in R and build a package. However, I've been getting an unusual segfault that I'm unable to trace its origin. After many attempts of debugging using gdb, commenting out parts (or all of my code) and valgrind, I'm unable to make heads or tails about what I'm doing wrong. In fact, when
2007 Oct 01
1
saving and loading complex objects
Dear Sir: When I try to save large and very complex recursive objects with some components containing models (such as the output from arima or lm ), the resulting file sizes increase by 4 meg per save. example directory: amex 8 meg argentina 12 meg australia 16 meg ... Moreover, I am unable to read these file objects back into R. I note that readBin and writeBin
2009 Feb 25
3
Saving rich text to the database
I''ve started trying to use the wysihat rich text editor from 37- signals and everything is going well except that I get an error when trying to save the text from the enhanced field to the database. This is from my log: Processing InstructionsController#new (for 127.0.0.1 at 2009-02-25 06:04:57) [POST] Session ID: BAh7CCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
2008 Nov 15
4
data not being saved
I am trying to save data entered in a form and nothing seems to be saving. What do you I have to look at to ensure everything is set-up correctly? I have looked in my database.yml file and all looks good and the database that I am trying to use exist. Thanks, -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Aug 29
0
how to contrast with factorial experiment
Hello, R experts, If I understand Ted's anwser correctly, then I can not contrast the mean yields between sections 1-8 and 9-11 under "Trt" but I can contrast mean yields for sections 1-3 and 6-11 because there exists significant interaction between two factors (Trt:section4, Trt:section5). Could I use the commands below to test the difference between sections 1-3 and 6-11 ?
2009 Sep 27
3
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week New packages ------------ * bdoc (1.0) Michael Anderson http://crantastic.org/packages/bdoc This package contains a function that will classify DNA barcodes as well as a few test and reference data sets. * bdsmatrix (1.0) Terry Therneau http://crantastic.org/packages/bdsmatrix This is a special case of sparse matrices, used by coxme and
2014 Jan 31
1
libguestfs-test-tool hangs on Btrfs
A simple libguestfs-test-tool invocation on Btrfs machine hangs as noted below. Versions and related details here: https://bugzilla.redhat.com/show_bug.cgi?id=1060126 Complete strace: http://kashyapc.fedorapeople.org/temp/qemu-strace.log ---------------- $ libguestfs-test-tool ************************************************************ * IMPORTANT NOTICE
2016 Aug 29
2
guestfs_launch gets stuck
Hello everyone, I am using libguestfs on CentOS 7.2. I am trying to modify Red Hat 5.4 disks. I am using C/C++. I found the process gets stuck inside guestfs_launch: Thread 1 (Thread 0x7fe3aa6148c0 (LWP 1265)): #0 0x00007fe3a9032c20 in __poll_nocancel () from /lib64/libc.so.6 #1 0x00007fe3aa1e5ea4 in read_data () from /lib64/libguestfs.so.0 #2 0x00007fe3aa20af0c in
2017 Aug 23
2
virt-sysprep: error: no operating systems were found in the guest image on libguestfs-1.36.5
Hi all, I encountered the following error when I tried to run virt-sysprep on a qcow2 image. virt-sysprep: error: no operating systems were found in the guest image The version I used for libguest is as follows: [libguestfs-1.36.5] The same issue happened on other versions such as libguestfs-1.32.7. # ./run ./sysprep/virt-sysprep -v -x -a