Displaying 20 results from an estimated 6000 matches similar to: "making package interface with FORTRAN under windows"
2010 Jan 26
1
library.dynam
hi, i'm having some trouble getting a package to load a shared library
object in .onLoad(...)
i have a shared object file, say "mylib.so".
if i start an R session, and via the CLI specify the actual library
via:
> dyn.load("mylib.so")
everything works quite well (i.e. i can then follow with some .Call
(...) methods)
now, i'd like to include this shared library in
2005 Jan 27
7
getting package version inside .First.lib
Greetings -
Is it possible, inside .First.lib,
to find out the version number of the package that is being loaded?
If only one version of the package has been installed,
we could scan the DESCRIPTION file, something like
.First.lib <- function(lib, pkg) {
library.dynam("spatstat", pkg, lib)
dfile <- system.file("DESCRIPTION", package="spatstat")
2009 Sep 14
1
loading a package .Rda file at package load time
Hi, I have seen the answer to this sometime before but I just can't find it
again - pointers appreciated.
I have a package that contains some data.frames saved as .Rda files in the
data/ directory. When the package is loaded I would like to have them be
available in the workspace (without the user having to explicitly load them
using data(...)).
If my package does not use a NAMESPACE, I can
2014 Jul 21
1
create R package include Fortran source code.
Hello, all
I am building a R package using Fortran source code. The Fortran code is a
subroutine. I can use "R CMD SHLIB bar.f -o bar.o" to create the shared
library. For the R package, I put the fortran file in the src/ and I use R
code as follows:
".First.lib"<-function(libname,pkgname){library.dynam("barpkg",pkgname,libname)}
barfun<-function(n,x){
2004 Jun 22
2
function not in load table
Hi,
I apologize for this often/old question. I found some hints but couldn't
solve the problem so far.
I have C functions (incl. the header files) as well as the R wrapper
functions which I want to use for faster calculations. These functions
are included in a R package.
The installation process seems to be ok (no errors). I also can load the
package without errors. But when I call the
2004 Jun 10
3
Package installation
Hi all,
I'm very new to R.
I have installed R 1.9.0 on Linux (Fedora).
Now I got an self-made package comprising R functions as well as C-Code
which are used in several R functions.
I installed the package without any error (see install log below).
Then, I checked in /usr/lib/R/library if the package izbi exists and it
exists.
But whenever I try to load the library on the command line I
2008 Jan 07
3
Finding windows DLLs
The XML package relies on libxml2.dll (e.g., bundled with the CRAN
binary) installed in library/XML/libs. Unfortunately,
c:/WINDOWS/system32/libxml2.dll will be found and loaded before
this.
Is there any programatic solution?
Thanks,
Martin
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold
2009 May 22
2
Step by step: Making an R package with Fortran 95
To all. I need your help. The big question is: How do I make an R library
with Fortran 95 files? You may assume that I am a pretty decent programmer
in both R and Fortran. I lay out a scenario and need your help!
I know how to make an ordinary R package and have dabbled with R + Fortran
95 *.dll linking. I do not have a great handle on the whole Makevars file
and whatever else I might need
2010 Feb 15
1
R-Commander plug-in difficulties
Hi All,
I have recently created an Rcmdr plugin package and it passed all the
checks and was uploaded to CRAN. I then downloaded it from CRAN and
tried running it from my local R program and received this error:
...
Error in f(libname, pkgname) : could not find function "getRcmdr"
Error in library(pkg, character.only = TRUE) :
.First.lib failed for 'RcmdrPlugin.MAc'
In my
2003 May 22
3
How to avoid function masking
Hi All,
I've been working on updating the 'genetics' package. As a consequence of
the upgrade, .First.lib() looks like:
.First.lib <- function(libname, pkgname)
{
if (!require(combinat))
warning("Unable to load 'combinat' library. Function
`diseq.ci' will fail.")
require(gregmisc)
genotype <-
2009 Mar 31
4
what is the preferred method to create a package local variable?
for the moment, I'm using:
.onAttach <- function(libname, pkgname) {
.bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah")
}
.onUnload <- function(libpath) {
dbDisconnect(.bbg.db.conn)
}
which results in a hidden global variable in the global environment.
I would prefer to make the assignment only in the package namespace.
2011 Jun 23
1
Class not found when search in .onLoad
Hi,
I am facing with a strange behaviour of isClass and extends when these
are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing
my package from doing some object initializations at a proper place
(i.e. in .onLoad).
Suppose one defines two S4 classes in a package, and that one needs to
check the inheritance between these two when loading the package (e.g.
to validate slots
2020 Jun 23
4
Restrict package to load-only access - prevent attempts to attach it
Hi,
I'm developing a package whose API is only meant to be used in other
packages via imports or pkg::foo(). There should be no need to attach
this package so that its API appears on the search() path. As a
maintainer, I want to avoid having it appear in search() conflicts by
mistake.
This means that, for instance, other packages should declare this
package under 'Imports' or
2004 Jun 22
3
[Q] GET_DIM() crash on Windows only
I have the following contrived code in package format.
On Solaris and Mac OS X, code runs just fine. On Windows,
it crashes the R environment with the "Send Bug Report"
dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries
with the same result. PCs otherwise appear properly
configured for creating R packages. Anything blatantly
wrong? Suggestions?
TIA
Relevant files from package
2011 Jan 26
1
Problem with "setMethod" in R package
Dear all,
My apologies for re-posting this question, but I have not found any
solution to my problem so far. I also think that my post may have been
overseen due to the posting time and high traffic on this list.
I experience a problem in implementing a S4 class in a package and would
appreciate your help in this matter.
The class is implemented using Rcpp, which works well. I then extend
2005 Dec 08
1
Loading namespaces
I'm creating a package for my own use that uses some S4 classes but no
methods.
I have a file called NAMESPACE it contains the line:
exportClasses("foo")
and at the top of the R file I have
setClass("foo", representation(x="numeric")
and the line:
.onLoad<-function(libname,pkgname)
When I run R CMD check I get Syntax error in the only R file. If I
2013 Jun 05
1
rJava is not loading
Hello!
I installed rJava and am trying to load it.
library(rJava)
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try
re-installing Java and make sure R and Java have matching architectures.
Error: package or namespace load failed for ‘rJava’
Any idea why?
Background info:
2007 Jul 04
1
Newbie creating package with compiled code
Hi R Gurus!
I'm trying to create a test package using the package.skeleton function.
I wanted to add some compiled code too.
In the src library, I put together a baby subroutine, compiled it and created
a test.dll
When I use the R cmd build, it works fine. But I get into trouble
with the R CMD check section.
/home/Desktop/R-2.5.1/bin # ./R CMD check mypkg
* checking for working latex ...
2011 Apr 21
1
Package check issue: Rprofile.site is not used
Dear R-users,
I am having some issues with a package I am working on (using R 2.12.1 in a
Linux environment) and would like to have your opinions/advises. My package
- let's call it mypackage for the purpose of this email - passes all checks
of R CMD check, except for the following failure message:
Error : .onLoad failed in loadNamespace() for 'mypackage', details:
call:
2012 Oct 31
2
Snallball, rJava, and R 2.15.1
I just bought a new machine and installed the latest release of R 2.15.1 two
days ago. Loaded libraries yesterday (all reported successful loads).
While running scripts, rJava and Snowball would not load. Here is Snowball
successful install:
> utils:::menuInstallPkgs()
trying URL
'http://cran.cs.wwu.edu/bin/windows/contrib/2.15/Snowball_0.0-8.zip'
Content type