1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
There are two ways to install this package:
a) during the configuration and installation of GGobi
b) as a regular R package.
a) Untar the GGobi distribution (i.e. ggobi_0.91-0.tar.gz), creating a directory named ggobi/
Change to that directory and untar this Rggobi tar file, e.g.
cd ggobi
tar zxvf <wherever>/Rggobi_0.4-0.tar.gz
Next, from within the ggobi/ directory, configure GGobi with the additional argument
--with-R and then type make, i.e.
./configure --with-R [any other arguments for configure]
make
b) To intall this software as an R package/library, do the following.
R CMD INSTALL Rggobi_0.1.tar.gz
or from within this directory (as the result of un-tarring
the Rggobi_0.1.tar.gz file)
R CMD INSTALL ../Rggobi
These commands will attempt to install the library into the directory
library/ within the R installation tree. To install it somewhere else,
use the -l <directory> argument, as in
R CMD INSTALL -l /tmp/R/pkg Rggobi_0.1.tar.gz
(First make certain that directory exists.)
To tell R to look in that directory for the Rggobi library,
set the environment variable R_LIBS to that directory name, eg.
setenv R_LIBS /tmp/R/pkg
or
R_LIBS=/tmp/R/pkg; export R_LIBS
depending on what shell you are using (Csh/Tcsh or sh/bash respectively.
Then run R and issue the command
% R
> library(Rggobi)
To test that things work, give the command
> ggobi(system.file("data", "flea.dat", package="Rggobi"))
The installation of this library requires GGobi. The configuration
script will attempt to find the the GGobi include files and library.
If it is unsuccessful, you will need to tell it where to find them.
It should tell you how to do this via its error messages when it fails
to find the GGobi files.
Developers:
===========
For the developers, to create such a package, issue
the command
make ADMIN=1 tar
This creates the Rggobi_0.1.tar.gz file which can be installed
as above.
Alternatively, issue the command
make ADMIN=1
which puts all the files that would be in the tar file
in the directory /tmp/R/Rggobi. Then you can say
R CMD INSTALL /tmp/R/Rggobi
and it will install in the same manner.
You can also use the -l flag in the R CMD INSTALL command.
Old Instructions:
================
The following are instructions to get this going in a very
simple manner. We will create an R package in the future.
This is just for use by those experimenting with the Ggobi
source.
To get this going, make sure you have version 1.0.1 of R at least.
(Get the most recent snapshot from franz.stat.wisc.edu)
Then build libGGobi.so in the directory above this. (On some
machines, you will need to remove the object files (.o's) built for
compiling the ggobi application. This is because they are not
relocatable (a.k.a. position inpdendent as compiled via the -fPIC or
-KPIC compiler flags for gcc and Solaris cc respectively.)
Now, generate the R.so shared library in this directory.
(Note that the makefile here includes the Makeconf file
from the R distribution. That is created via the configure
script when installing R.)
Run R in this directory and issue the commands.
source("Src/ggobi.S")
source("Src/rows.S")
.First <- function() dyn.load("R.so")
Then quit (q()) and elect to save the
work area (type y).
Now, set the environment variable LD_LIBRARY_PATH
to the current working directory - i.e. the output of `pwd`.
Now run R. Hopefully it will not complain about not being
able to load R.so because of missing symbols, an inability
to find libGGobi.so, etc.
Issue the commands
ggobi()
ggobi.setData(paste(system("pwd",T),"/../data/flea", sep=""))
|