search for: 5e7

Displaying 9 results from an estimated 9 matches for "5e7".

Did you mean: 57
2009 Sep 08
5
sparse vectors
Hi I deal with long vectors almost all of whose elements are zero. Typically, the length will be ~5e7 with ~100 nonzero elements. I want to deal with these objects using a sort of sparse vector. The problem is that I want to be able to 'add' two such vectors. Toy problem follows. Suppose I have two such objects, 'a' and 'b': > a $index [1] 20 30 100000000 $...
2008 Aug 17
1
Wichmann-Hill Random Number Generator and the Birthday Problem
...N = 10M samples. My testing results (see below) agree with above analysis. But for Wichmann-Hill, it wasn't. Wichmann-Hill's cycle is 6.9536e12 (refer to RNG help by ?RNG and Whichmann's correction in 1984). Thus M <= 6.9536e12. D >= 7.19052 when N=1e7 and D>= 179.763 for N=5e7. But in my tests, duplications were surprisingly not observed. It seems that Wichmann-Hill has a much larger cycle than the one documented! Anybody can solve this puzzle? Regards, Shengqiao Li Department of Statistics West Virgina Unversity ==============Testing=================== > RNG...
2013 Jan 05
2
lapply (and friends) with data.frames are slow
Hey guys, I noticed something curious in the lapply call. I'll copy+paste the function call here because it's short enough: lapply <- function (X, FUN, ...) { FUN <- match.fun(FUN) if (!is.vector(X) || is.object(X)) X <- as.list(X) .Internal(lapply(X, FUN)) } Notice that lapply coerces X to a list if the !is.vector || is.object(X) check passes. Curiously,
2004 Apr 05
0
speed difference between pgf77 and g77 on amd64
...compiled R-1.9.0beta_2004-04-02 with pgf77/gcc/g++ and g77/gcc/g++, both _without_ fast BLAS. Both passed make check-all. Simple crossprod(m) for fairly large `m' shows that the version compiled with pgf77 is about 15% faster: [andy@leo:scratch]% echo "set.seed(1); m <- matrix(runif(5e7), 1e4); gc(); system.time(crossprod(m))" | R-1.9.0-PGI/bin/R --slave -q used (Mb) gc trigger (Mb) Ncells 431805 23.1 741108 39.6 Vcells 50125266 382.5 150395933 1147.5 [1] 671.14 0.30 762.35 0.00 0.00 [andy@leo:scratch]% echo "set.seed(1); m <- matrix(run...
2006 Dec 09
7
Simulation with R
An apparatus exists whereby a collection of balls is displaced to the top of a stack by suction. A top level (Level 1) each ball is shifted 1 unit to the left or 1 unit to the right at random with equal probability. The ball then drops down to level 2. At Level 2, each ball is again shifted 1 unit to the left or 1 unit to the right at random. The process continues for 15 levels and the balls are
2013 Mar 22
1
Why does typeof() modify an object's "named" field?
Hello, Doing typeof() on an object appears to reset the "named" field in its sxpinfo header to 2, which can change the way that subsequent subassignment operations are carried out: X <- 1:5e7 .Internal(inspect(X)) # @4eeb0008 13 INTSXP g0c7 [NAM(1)] (len=50000000, tl=0) 1,2,3,4,5,... system.time(X[1] <- 9L) # user system elapsed # 0 0 0 typeof(X) .Internal(inspect(X)) # @4eeb0008 13 INTSXP g1c7 [MARK,NAM(2)] (len=50000000, tl=0) 9,2,3,4,5,... system.time(X[2]...
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
2000 Nov 09
3
maximum of nsize=20000k ??
Dear R-ers, somehow it is not possible to increase nsize to more than 20000k. When I specify e.g. > R --vsize=10M --nsize=21000K the result is: free total (Mb) Ncells 99658 350000 6.7 Vcells 1219173 1310720 10.0 Maybe I have overlooked s.th.... Marcus -- +------------------------------------------------------- | Marcus Eger | E-Mail: eger.m at gmx.de (NEW) |
2011 Feb 17
2
amount of data R can handle in a single file
Dear Sir/Madam, I would like to know what is the maximum number of observations a single file must have when using R. I am asking this because am trying to do research on banking transactions and i have around 49million records. Can R handle this? Advise with regard to this. Mark Nasila Quantitative Analyst CBS Risk Management Personal Banking 7th Floor, 2 First Place, Cnr