similar to: function pointers?

Displaying 20 results from an estimated 1000 matches similar to: "function pointers?"

2016 Jun 30
2
Calling C implementations of rnorm and friends
Hi all, Looking at the body for the function rnorm, I see that the body of the function is: .Call(C_rnorm, n, mean, sd) I want to implement functions that generate normal (and other) random variables. Now, I understand that I can perfectly well just call the R wrapper for these functions and that will be almost indistinguishable for most purposes, but for whatever reason I wanted to try and
2016 Jul 01
2
Calling C implementations of rnorm and friends
Gabriel, Thanks for that! I guess I really should have figured that one out sooner, huh? I understand why that wouldn't be CRAN-compliant. But then, what *is* the proper way to do it? Is there any way I can call unexported functions from another package and have it accepted by CRAN? Also, if I instead re-write the random variable generating functions, do you have any idea of where the
2016 Jul 01
1
Calling C implementations of rnorm and friends
Well, For this particular use case why not just transform the parameters at the R level and then call the existing function? Is there not a closed form mapping? ~G On Jul 1, 2016 2:50 PM, "Joshua Ulrich" <josh.m.ulrich at gmail.com> wrote: > On Fri, Jul 1, 2016 at 6:13 AM, Luis Usier > <luis.henrique.usier at gmail.com> wrote: > > Gabriel, > > > >
2013 Sep 04
3
Fwd: Bienvenido a la lista de distribución R-help-es
Hola Jose, si CONCATENAR significa APILAR, es decir, concantenar verticalmente, por decirlo de algun modo, podrias hacerlo con rbind(): nuevovector <- rbind(vector1,vector2) Si ademas quieres que cada valor de los vectores originales sea identificado en el nuevovector, puedes usar: nuevovector <- stack(vector1,vector2) en este ultimo caso se agrega una columna adicional tipo factor, con
2004 Mar 10
2
R CMD check errors
Hello, I'm getting some error messages from R CMD check I can't deal with. I'm working under Linux with R 1.8.1 The package working directory can be found at: http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.tar.gz Here's the 00check.log produced by R CMD check distr * using log directory '/home/tom/studium/R/swp/swp/package/distr.Rcheck' * checking
2008 May 23
1
Evaluation "conflict" in combination of replicate() and rexp()as variable inside a function
Dear userRs, "playing around" with combinations of replicate() and random number generating functions inside a self-defined "wrapper" function I encounterd a puzzling behaviour. The following are intentionally simple (and rather nonsense-) examples to isolate the relevant aspects. Please, note the seemingly "inconsistent" behaviour for the second call of
2011 Sep 21
2
problem with function "Truncate" in package "distr"
Hello all, Can someone tell me why the following mixture of two log-normal distributions does not get truncated? What puzzles me is that the function works almost always, but for certain combinations (like the one below), it does not. # R code example library(distr) mix<-UnivarMixingDistribution(Lnorm(3.2,0.5),Lnorm(5.4,0.6),mixCoeff=c(0.3,0.7))
2004 Jul 06
1
questions about setMethod("Arith", ...)
Hi, we have some questions concerning the definition of new arithmetic methods. In our package "distr" (on CRAN) we define some new arithmetic methods for "+", "-", "*", "/". After loading "distr" the corresponding arithmetic methods work. Now, if we define a new class and also a new method for one of the arithmetic methods
2013 Sep 03
5
Bienvenido a la lista de distribución R-help-es
Hola, ¿qué tal? Tienes que escribir a la dirección r-help-es en r-project.org, no a las que has usado (que son de administración de la lista). Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El día 3 de septiembre de 2013 12:39, Jose Betancourt B. <betanster en gmail.com> escribió: > Quisiera saber en el paquete Epiestim > > Como lograr concatenar dos vectores,
1999 Nov 12
1
R-0.65.1 Startup
Dear R users, I have noticed that my R startup is extremely slow. It takes almost 3 minutes from "double-click" to R prompt. I have been running R-0.64.1 till recently and it took about 30 sec. I still have access to R-0.64.1. When I started it up, it took about 25 sec. Can anyone tell me if this is a bug in R or a problem with my machine? Note: This is after bootup with R being the
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) |
2018 Apr 18
2
odd assignInNamespace / setGeneric interaction
A coworker got tired of having to type 'yes' or 'no' after quitting R: he never wanted to save the R workspace when quitting. So he added assignInNamespace lines to his .Rprofile file to replace base::q with one that, by default, called the original with save="no".. utils::assignInNamespace(".qOrig", base::q, "base")
2007 Oct 28
1
tree problem
I am trying to use tree to partition a data set. The data set has 3924 observations. Partitioning seems to work for small subsets of the data, but when I use the entire data set, no partitioning occurs. The variables are: RESP respondent to a survey (0 = not a respondent, 1 = respondent) AGE_P Age (continuous) ORIGIN_I Hispanic Ethnicity (1 = Hispanic, 2 = non-Hispanic) RACRECI2 Race
1999 May 15
2
vsize and nsize
I am running R version ??? under Redhat 5.2. It seems as though the --nsize object has no effct on the size of the allocated Ncells as determined using gc(). Yes, I have that much data.... That is if I envoke R with R --vsize 100 --nsize 5000000 then type gc() I get free total Ncells 92202 200000 Vcells 12928414 13107200 Thanks Tony Long Ecology and Evolutionary Biology Steinhaus
2011 Nov 20
2
ltm: Simplified approach to bootstrapping 2PL-Models?
Dear R-List, to assess the model fit for 2PL-models, I tried to mimic the bootstrap-approach chosen in the GoF.rasch()-function. Not being a statistician, I was wondering whether the following simplification (omit the "chi-squared-expressed model fit-step") would be appropriate: GoF.ltm <- function(object, B = 50, ...){ liFits <- list() for(i in 1:B){ rndDat <-
2013 Sep 05
2
Pronósticos con modelos robusto de series de tiempo
Alguien me podría sugerir un paquete en R para generar pronóticos con modelos robusto de series de tiempo.   Saludos Enrique RAMOS [[alternative HTML version deleted]]
2005 Jul 07
2
r: LOOPING
hi all i know that one should try and limit the amount of looping in R programs. i have supplied some code below. i am interested in seeing how the code cold be rewritten if we dont use the loops. a brief overview of what is done in the code. ============================================== ============================================== ============================================== 1. the input
2011 Oct 06
1
apply and functions with many arguments
Dear all, I would like to use the following function fitdist(data, distr, method=c("mle", "mme", "qme", "mge"), start=NULL, fix.arg=NULL, ...) for many different distr values like distr=c("norm","lnorm","pois") (just a small example) and take back into a list the parameter name which is what is inside distr plus what the
2000 Oct 02
3
R vs S-PLUS with regard to memory usage
I am trying to translate code from S-PLUS to R and R really struggles! After starting R with the foll. R --vsize 50M --nsize 6M --no-restore on a 400 MHz Pentium with 192 MB of memory running Linux (RH 6.2), I run a function that essentially picks up an external dataset with 2121 rows and 30 columns and builds a lm() object and also runs step() ... the step() takes forever to run...(takes very
2010 Jan 19
2
Server hanging despite efforts to correct memory limits
My group is working with datasets between 100 Mb and 1 GB in size, using multiple log ins. From the documentation, it appears that vsize is limited to 2^30-1, which tends to prove too restrictive for our use. When we drop that restriction (set vsize = NA) we end up hanging the server, which requires a restart. Is there any way to increase the memory limits on R while keeping our jobs from