Displaying 20 results from an estimated 2000 matches similar to: "uniform sampling without replacement algorithm"
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
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
2013 Apr 29
2
Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame
Dear R forum
I have a data.frame as
cashflow_df = data.frame(instrument = c("ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC", "ABC", "PQR", "PQR",
2002 Nov 24
1
unif_rand() and exp_rand()
Dear R-users:
Recently I found my simulation run into an apparently infinite loop.
After a few days of tracing and chasing, I believe it is caused by
the built-in unif_rand() and exp_rand() functions: unif_rand() can
produce a value of 0 which causes the following part of exp_rand()
running into an infinity loop
u = unif_rand();
for (;;) {
u += u;
if (u > 1.0)
break;
2017 Oct 03
0
Revert to R 3.2.x code of logicalSubscript in subscript.c?
Suharto,
If you're interested in performance with subscripting, you might want
to look at pqR (pqR-project.org). It has some substantial performance
improvements for subscripting over R Core versions. This is
especially true for the current development version of pqR (probably
leading to a new release in about a month).
You can look at a somewhat-stable snapshot of recent pqR development
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
Commit-ID: 604d3a0a1570f3478360913c2935ea53d18857e6
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=604d3a0a1570f3478360913c2935ea53d18857e6
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Sat, 19 May 2018 02:39:50 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:55 +0000
[klibc] dash: exec: Stricter
2013 Jun 22
1
Announcing pqR - a faster version of R
I have released a new, faster, version of R, which I call pqR (for
"pretty quick" R), based on R-2.15.0. Among many other improvements,
pqR supports automatic use of multiple cores to perform numerical
computations in parallel with other numerical computations, and with
the interpretive thread. It also implements a true reference counting
scheme to reduce the amount of unnecessary
2015 Sep 19
0
New version of the R parser in pqR
I have rewritten the R parser in the new version of pqR that I
recently released (pqR-2015-09-14, at pqR-project.org). The new
version of the parser is much cleaner, is faster (sometimes quite
substantially faster), has a better interface to the read-eval-print
loop, and provides a better basis for future extensions. The deparser
has also been substantially revised in pqR, and is better
2018 Nov 27
1
Subsetting row in single column matrix drops names in resulting vector
Dmitriy Selivanov (selivanov.dmitriy at gmail.com) wrote:
> Consider following example:
>
> a = matrix(1:2, nrow = 2, dimnames = list(c("row1", "row2"), c("col1")))
> a[1, ]
> # 1
>
> It returns *unnamed* vector `1` where I would expect named vector. In fact
> it returns named vector when number of columns is > 1.
> Same issue applicable
2010 Feb 03
2
How to change output 'csv' file
Dear R helpers
After executing the R code, where the last few lines of the code are something like given below.
## Part of my R code
n = 20
........
.........
final_output = data.frame(Numbers = numbers, ABC = data1, XYZ = data2, PQR = data3)
write.csv(data.frame(Scenario = paste("Sc_", 1:n, sep = ""), final_output'), 'result.csv', row.names
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers
I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.
This means in another case even if I
2014 Jun 23
2
Unfixed bugs in latest R-patched
A new version of pqR is now available at pqR-project.org, which fixes
several bugs that are also present in the latest R Core patch release
(r66002). A number of bugs found previously during pqR development
are also unfixed in the latest R Core release. Here is the list of
these bugs that are unfixed in r66002 (including documentation
deficiencies), taken from the pqR bug fix and documentation
2023 Feb 16
0
User-defined RNG with the standalone Rmath library
I have two questions about using a user-defined random number generator (RNG) with the standalone Rmath library. The default RNG with the standalone Rmath library is the Marsaglia-multicarry generator, which has poor properties. The "R Installation and Administration" manual, in the section "The standalone Rmath library", states that:
```
A little care is needed to use the
2013 Apr 26
2
Splitting data.frame and saving to csv files
Dear R Forum,
I have a data.frame as
df = data.frame(date = c("2013-04-15", "2013-04-14", "2013-04-13", "2013-04-12", "2013-04-11"),
ABC_f = c(62.80739769,81.04525895,84.65712455,12.78237251,57.61345256),
LMN_d = c(21.16794336,54.6580401,63.8923307,87.59880367,87.07693716),
XYZ_p = c(55.8885464,94.1358684,84.0089114,98.99746696,64.71083712),
2015 Aug 21
0
Problems with embedded R, ReplDLL
Along with getting pqR to work on Windows, I've also been testing it
in the context of embedded R, and in the process have found some
problems with the examples given of embedded R use.
One problem can be seen in R_ReplDLLinit, in src/main/main.c:
void R_ReplDLLinit(void)
{
SETJMP(R_Toplevel.cjmpbuf);
R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
2017 Jan 09
0
accelerating matrix multiply
> From: "Cohn, Robert S" <robert.s.cohn at intel.com>
>
> I am using R to multiply some large (30k x 30k double) matrices on a
> 64 core machine (xeon phi). I added some timers to
> src/main/array.c to see where the time is going. All of the time is
> being spent in the matprod function, most of that time is spent in
> dgemm. 15 seconds is in matprod in
2000 Jun 12
0
BACKUP SYSTEM WITH SAMBA
Dear Sirs.
I'm trying to make a Backup System using SAMBA.
The purpose is make backup of some directory of Windows 9x machines,
like Office Documents, E-mails directory, etc.
If I make one software that "select" and backup certain directories, it
will be good.
There are ~200 machines with Windows 9x, in 5 C class network:
1 - xyz.pqr.8.abc
2 - xyz.pqr.9.abc
3 - xyz.pqr.10.abc
4 -
2010 Feb 10
1
Converting pdb to pqr
There are websites using python to convert a pdb to a pqr. I was wondering if
there is a simpler way to do it. We have a protein in pdb format, and want
to convert that to a pqr file so that the program apbs can open it. We want
to accomplish this conversion in R. Thank you for your help.
--
View this message in context: http://n4.nabble.com/Converting-pdb-to-pqr-tp1475426p1475426.html
Sent
2017 Mar 07
0
length(unclass(x)) without unclass(x)?
> Henrik Bengtsson:
>
> I'm looking for a way to get the length of an object 'x' as given by
> base data type without dispatching on class.
The performance improvement you're looking for is implemented in the
latest version of pqR (pqR-2016-10-24, see pqR-project.org), along
with corresponding improvements in several other circumstances where
unclass(x) does not
2018 Sep 19
0
Bias in R's random integers?
On 19/09/2018 12:23 PM, Philip B. Stark wrote:
> No, the 2nd call only happens when m > 2**31. Here's the code:
Yes, you're right. Sorry!
So the ratio really does come close to 2. However, the difference in
probabilities between outcomes is still at most 2^-32 when m is less
than that cutoff. That's not feasible to detect; the only detectable
difference would happen if