[Rd] Creating a package bundle.

2006-03-26 Thread Steve Su
Dear All,

 

What is the easiest way to create a package bundle in R? I have three
packages I would like to group together in which one package will
depends on three others. It looks like from

http://tolstoy.newcastle.edu.au/R/help/01a/0284.html, all that is
required is to put require in the .First? I wonder how one can create a
package so that when it is downloaded,

all the other packages are downloaded and installed as well? In my case,
the three sub packages are not written by me and are already in R so I
would like to keep the current

versions as part of the bundle rather than allow them to get updated so
there will not be compatibility problems?

 

I am aware there is a writing R extensions guide but it seems to be
geared towards a more advanced user rather than beginner like me?

 

Thanks in advance.

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] "sh" is not recognised as an internal or external command, operable program or batch file

2006-03-26 Thread Steve Su
Dear All,

 

I was trying to check my package using 

 

R CMD check GLDEX 

 

And I got the following error?

 

"sh" is not recognised as an internal or external command, operable
program or batch file

 

Can anyone let me know what might be the cause of this error?

 

Thanks.

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Compiling codes from existing packages.

2006-03-29 Thread Steve Su
Dear All,

 

I wonder if there is a step by step guide somewhere that will allow me
to use Fortran and C codes from packages already on CRAN? I am using
Windows XP and "R-2.2.1".

 

I could link to these packages but the problem is that they get updated
and they are not backward compatible. Also, I only require a few
functions from these packages so it does not seem efficient to load the
entire packages every time. 

 

Reading the "writing R extensions" and readme.packages leave me rather
confused and disoriented, there are bits of information that seem to
help, but there also seems to be lots of gap in the process which I have
no idea how to fufil. I think these are good documents as a reference
guide for people who know what the underlying process is, but not so
useful for beginners like me, unfortunately.

 

My question is given I have three C codes (which I can put into one
file?) and series of Fortran codes in one file, (and they are already on
CRAN), how should I compile it into a dll and make it as part of my
package? I have got the command scripts {also from CRAN, extension .R}
calling these procedures and I have change the package="name of my
package" but where do I go from there seems to be a complete mystery to
me at this stage?

 

Any pointers would be very welcome indeed. 

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Fortran and C entry point problem.

2006-03-30 Thread Steve Su
Dear All,

 

I have seen a number of e mails on this topic but I have not seen a
general solution to date. I have Fortran and C source codes and they
have been compiled successfully using:

 

R CMD build mypackage

 

And

 

R CMD install mypackage

 

Without error messages. 

 

I then open R and tests out two functions and get:

 

> pgl(0.2,1,2,3,4)

Error in .C("gl_fmkl_distfunc", lambdas[1], lambdas[2], lambdas[3],
lambdas[4],  : 

C entry point "gl_fmkl_distfunc" not in DLL for package
"mypackage"

> runif.sobol(10,5)

Error in .Fortran("sobol", as.double(qn), as.integer(n),
as.integer(dimension),  : 

Fortran entry point "sobol_" not in DLL for package "mypackage"

 

 

Alternatively running C CMD check mypackage will also pick up these
errors when they try to run the examples.

 

I have used Fortran and C codes already available on CRAN so I am unsure
what is the missing link to make these work?

 

Can anyone provide an explanation and procedure to over come this
problem?

 

Thanks.

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel