similar to: Calling C implementations of rnorm and friends

Displaying 20 results from an estimated 2000 matches similar to: "Calling C implementations of rnorm and friends"

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, > > > >
2016 Jun 30
0
Calling C implementations of rnorm and friends
Luis, C_rnorm is a symbol but it's not exported. This means that you *can* do this by using stats:::C_rnorm. That said, it's not exported, which means that it's not supported to do this. So your package likely would not be allowed on CRAN, for example. Best, ~G On Jun 30, 2016 2:08 PM, "Luis Usier" <luis.henrique.usier at gmail.com> wrote: > Hi all, > >
2016 Jul 01
0
Calling C implementations of rnorm and friends
On Fri, Jul 1, 2016 at 6:13 AM, Luis Usier <luis.henrique.usier at gmail.com> wrote: > 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
2017 Nov 22
2
function pointers?
We have a project that calls for the creation of a list of many distribution objects. Distributions can be of various types, with various parameters, but we ran into some problems. I started testing on a simple list of rnorm-based objects. I was a little surprised at the RAM storage requirements, here's an example: N <- 10000 closureList <- vector("list", N) nsize = sample(x
2010 Oct 07
2
Re: running 16 bit real mode executables on mac
Hey guys, i know this post is old, but i'm also having the same problem. I'm trying to compile MASM 6.1.5 programs in wine, and using ml.exe compiles and links everything perfectly and outputs a .exe file with no complaints. Then, when i try and run the program it give me an error like Code: fixme:module:__wine_load_dos_exe DOS executables not supported on this platform winevdm:
2002 Aug 05
1
constructing a formula
Dear Listers, I am having trouble figuring out how to build a formula using a variable list. For example, I have: a _ data.frame(a=rnorm(1000)) a$b_rnorm(1000)+.5*a$a a$c_rnorm(1000)+.5*a$b a$d_rnorm(1000)+.5*a$b+.1*a$a attach(a) and I estimate, lm(d ~ b+c+d) BUT, I wish to construct a generalized solution in which, ListOfVar _ c('b','c','d') The question is how
2011 Dec 02
0
Save Venn-diagram (Vennerable) together with table and plot in single pdf page
Dear R-users I want to save a list with characters a point plot and a Venn diagram in a single pdf page. I am successful to do this when I use a character list and two point plots. However when I try to replace the first point plots with my Venn diagram (built with Vennerable package, compute.Venn() and plot.Venn()) the Venn plot will not position at the right place in the pdf. I guess there
2011 Apr 20
3
useDynLib in older versions e.g. (2.10)
Hi, Has something changed regarding the useDynLib in the NAMESPACE file in packages? I've written a package that works in e.g. 2.12/2.13 but simply cannot find the dynamic library under windows. The version on CRAN is older than the one I'm talking about and depends on a newer version of R but I want to make the package available to people with older versions. >
2009 Jun 24
2
loadNamespace and useDynLib
I am considering a package with a namespace (Rgraphviz from Bioc). I essentially want to have some error handling for loading the dll, something like wrapping it into tryCatch or similar (reason: see below). Right now I am loading the dynamic libraries by useDynLib in my NAMESPACE file. When I look at the code from loadNamespace, I have the impression that what I want is impossible
2008 Feb 29
1
patch for random.c
Dear all, while looking for some inspiration of how to organise some code, I studied the code of random.c and noticed that for distributions with 2 or 3 parameters the user is not warned if NAs are created while such a warning is issued for distributions with 1 parameter. E.g: R version 2.7.0 Under development (unstable) (2008-02-29 r44639) [...] > rexp(2, rate=Inf) [1] NaN NaN Warning
2011 Jun 03
2
Checking and building package
Hello! I am truing to compile an R-package having c-code. I put foo.c in src/ folder and useDynLib("foo") in NAMESPACE file. When trying R CMD check, I got an error message that shared object 'foo' is not found. Then I did R CMD SHLIB foo.c first. However, after that, I got warnings from R CMD check that there is an object file in /src folder. Even worse is if I run R CMD
2006 Sep 12
2
Memory problems with a custom R package
Hi everyone, I have been attempting to build a very simple R package interfacing with some very simple C++ code. Everything I try though results in the function working but on return it produces a memory error. Here is the output: ***********OUTPUT*************************** > library(MyPackage) > hello(); *** caught segfault *** address 0x3, cause 'memory not mapped'
2004 Aug 04
1
installing package with version number using namespaces & dynamic library
Hi, I wonder whether a package with namespace & dynamic library can be installed with the version number attached, ie. with the argument --with-package-versions. Is this currently possible? Using R 1.9.1 on Debian 3.0 I encounter a problem when trying to load a package installed with R91 CMD INSTALL --with-package-versions -l /mnt/local/R/R-1.9.x-libs-EpiR RIO in R started with R91
2017 Feb 14
6
Registration of native routines
Registration of 'native routines' (entry points in compiled code loaded into R) has been available for over 14 years, but few packages make use of it (less than 10% of those on CRAN with compiled code). Registration has similar benefits to name spaces in R code: - it ensures that the routines used by .C, .Call etc are those in your package (without needing a PACKAGE argument). - it
2004 Sep 19
1
Namespace problem
Now I try to add some C and Fortan code to my package, so the NAMESPACE file is useDynLib(eha) importFrom(survival, Surv) export(mlreg.fit, risksets) but I get ..... * checking R files for library.dynam ... OK * checking S3 generic/method consistency ... WARNING Error in .try_quietly({ : Error in library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) :
2009 May 27
1
"Error: package/namespace load failed"
I am writing my first R package, and I have been getting the following series of errors when I run R CMD check: * checking S3 generic/method consistency ... WARNING Error: package/namespace load failed for 'REEMtree' Call sequence: 2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)), call. = FALSE, domain = NA) 1: library(package,
2010 Nov 12
1
unloading compiled code.
I have a package that I'm developing that I need to unload the library. Long story short I figured out that the leaving the compiled code loaded lead to a segmentation fault, but unloading the code will fix it. I've read the documentation and it appears that there are several ways to do this? What is the popper accepted current standard for unloading compiled code? The options as I
2004 Jul 08
1
building packages with NAMESPACE
hi! I tried to build a very simple package with NAMESPACE file, such that datasets are loaded only dynamically. > a2 <- function(x=a1) x+4 > a1 <- 1:10 > package.skeleton("aaa", list=c("a1", "a2")) Then I modified the help files and added the file NAMESPACE with these 2 lines: useDynLib(aaa) export(a1, a2) Then "R CMD BUILD aaa" works
2019 Feb 01
2
Set the number of threads using openmp with .Fortran?
Hi everybody, I'm trying to develop an R package with Fortran and OpenMP. I wrote a simple hello world but I'm not able to set the number of threads. I found this old email chain <http://r.789695.n4.nabble.com/Set-the-number-of-threads-using-openmp-with-C-td2284685.html> and I tried to set my compile instructions accordingly but i had no luck. *This is my makevars:*