similar to: source for function sample() in package base?

Displaying 20 results from an estimated 1000 matches similar to: "source for function sample() in package base?"

2009 Oct 13
7
lapply() reccursively
Hi all, I was wondering whether it is possible to use the lapply() function to alter the value of the input, something in the spirit of : a1<-runif(100) a2<-function(i){ a1[i]<-a1[i-1]*a1[i];a1[i] } a3<-lapply(2:100,a2) Something akin to a for() loop, but using the lapply() infrastructure. I haven't been able to get rapply() to do this. The reason is that the "real"
2010 May 20
1
RSpython Ubuntu
Dear List, I'd like to call pyhton function from within R. I tried installing the latest version of RSPython: wget http://www.omegahat.org/RSPython/RSPython_0.7-1.tar.gz R CMD INSTALL --clean RSPython_0.7-1.tar.gz I get a compile error (posted below). Did anyone else run against this ? Is there a solution ? checking for python... /usr/bin/python Python version 2.6 Using threads checking
2012 Apr 08
2
xyplot() does not plot legends with "relation=free" scales
Hi all, I have this problem with lattice that xyplot() won't draw some of my axis labels if the type (i.e. the relation argument) of scales is set as free. For example, in the plot below, I would want it to also show: 1. the labels E1,...E6 below the 10th panel (i.e. 3rd row, 2 col)....just as it is now done below the 12th panel.... 2. as well as the labels (2,4,6,8) on the top of panels 1
2010 Jun 09
1
Rglpk
Hi list, in the Rglpk_solve_LP function (::Rglpk), on line 26, the function calls a function as.glp_bounds() that i cannot access. i'm trying to alter the Rglpk_solve_LP function to add a line to retrieve column/row dual values. everytime i change the slightest line of code inside Rglpk_solve_LP() [to even add a print] i get a ': could not find function "as.glp_bounds"'
2010 Aug 16
2
Random Number Generators and Sample
I am trying to get documentation about the random number generator used in "sample". The help for sample does not mention it. Can anyone point me in the right direction. Thanks [[alternative HTML version deleted]]
2005 Apr 12
3
where is internal function of sample()?
Hi there, I am trying to write a c++ shared library for R. I need a function which has the same functionality as sample() in R, i.e., does permutation, sample with/without replacement. Does R have internal sample routine so that I can call it directly? I did not find it in R.h, Rinternal.h. Thanks
2018 Sep 20
2
A different error in sample()
FWIW, I suspect this is related to the function R_unif_index that was introduced in src/main/RNG.c around revision 72356, or the way this function is used in do_sample in src/main/random.c. 20.9.18 08:19, Wolfgang Huber scripsit: > Besides wording of the documentation re truncating vs rounding, there is > something peculiar going on with the fractional part of n: > > >
2013 Jan 10
2
Determining sample size from power function
Hello, I am trying to get the power function to report the sample size rather than the power. My goal is to input a variety of values for theta and then for the power function to report the corresponding sample sizes. I haven't had much luck trying to create my own function, something along the lines of: f <- function (x) {
2010 Aug 25
1
(no subject)
Hi I am using repeated meaturement data for my project and I want to use quantile regression with multilevel or panel data in "R." I dont find the basic version of software in R, so I have difficulty in using it. I would also appreciate if anyone more proficient in R could help me how to run this. best wishes  M.A-Vakili Department of Biostatistics Faculty of Medicine Shiraz/Iran
2004 Aug 06
2
[lists] Speex & Java ...
On Thu, 2003-04-03 at 12:59, Kaveh Goudarzi wrote: > Hello People, > > Are there any ongoing efforts to port speex enc/dec > to java? I know there are a couple of things lying about in > jcraft and other sites but they all seem a little half hearted. You might like to write a JNI Wrapper. Cheers David > I've used jspxdec.zip written by james.lawrence@hellonetwork.com
2004 Aug 06
2
[lists] Speex & Java ...
> Thanks, I'm having a look at it. I've also had a look at the > various files making up libspeex trying to see how hard the port to > java would be ... Having only had a cursory look it looks ok except > for filters_sse.h & lpt_sse.h which have some assembly. > > Jean-Marc can you throw some light on what these do ... Also > anyone interested in chiping in some
2006 Jan 21
1
A patch for do_sample: check replace arg
A colleague sent me the following: If you specify probabilities in the 'sample' function and forget to type 'prob=...', then you get nonsense. E.g. sample(1:10,1,c(0,0,0,0,1,0,0,0,0,0)) does not filter '5', while sample(1:10,1,prob=c(0,0,0,0,1,0,0,0,0,0)) does it correctly. I wish this would return an error because the
2013 Jan 11
1
problems with package 'segmented'
Dear R-users, I am trying to understand how the 'segmented'-package works to determine breakpoints and slopes of regression lines in broken-line regression models. However, I am not able to repeat the example on the "plant"-dataset, which was reported in the accompanying paper of the package. (V.M.R Muggeo, "Segmented: an R package to fit regression models with
2006 Feb 12
2
Zap, Caller ID problem
Dear All, I've got a weird problem with my asterisk box which has fxo interfaces (TDM400). Well, the problem is that the interface answers the call, but no caller id is being received. Also, sometimes this error happens: fsk_serie made mylen < 0 Any idea what is going on? Thanks, Kaveh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has
2007 Dec 06
2
Segmented regression
Hello all, I have 3 time series (tt) that I've fitted segmented regression models to, with 3 breakpoints that are common to all, using code below (requires segmented package). However I wish to specifiy a zero coefficient, a priori, for the last segment of the KW series (green) only. Is this possible to do with segmented? If not, could someone point in a direction? The final goal is to
2004 Aug 06
2
fixed point conversion volunteer (OMG what am I doing?)
Hello Mark: Count me in. I'm an excellent C programmer and I've done assembly coding. Although I've not done float to int conversions, I'll pick it up quickly ... send me an example, please. Also, I direct The Tech Startup Connection here in Silicon Valley, so I have a very large resource pool. Check out
2011 Aug 26
3
How to vectorize a function to handle two vectors
Dear R-users I am trying to "vectorize" a function so that it can handle two vectors of inputs. I want the function to use phi (a function), k[1] and t[1] for the first price, and so on for the second, third and fourth price. I tried to do the mapply, but I dont know how to specify to R what input I want to be vectors (k and t)(see in the bottom what I tried). I have read the help file,
2009 Sep 20
1
Return a list from a .Call but segfaults
Hello, I call a function via .Call passing to it a raw vector(D) and an integer(I) The vector is a series K1,KData1, V1,VData1, K2, KData2, ... where the integer K1 is the length of Data1 and similarly for Ki (wrt Datai)(similarly for V*) There 2*I such pairs( (Ki,KDatai), (Vi,VDatai)) The numbers Ki(and Vi) are written in network order. I am returning a list of I elements each element a
2009 Jan 02
2
Deprecated Realtime application, what's to be gained ???
Hi, After seeing in "pbx/ael/ael-test/ael-test5/extensions.ael" some interesting use case of RealTime to store extension data (forwardto, dnd, ...) i started to play with it. To my surprise the two applications RealTime() / RealtimeUpdate() have been deprecated in favor of the REALTIME() function. While it's not a big deal for the write part since it's only a matter a shifting
2018 Sep 20
3
A different error in sample()
Good day, The use of "rounding" also doesn't make sense. If The number is halfway between two integers, it is rounded to the nearest even integer. > round(2.5) [1] 2 -------------------------------------- Dario Strbenac University of Sydney Camperdown NSW 2050 Australia