[Rd] iconv.dll in Windows

2009-03-12 Thread James MacDonald
I recently built R-devel on Windows XP (sessionInfo below), and when loading 
libraries that require the iconv.dll was getting an error stating that 'This 
application has failed to start because iconv.dll was not found. Re-installing 
the application may fix this problem.'.

An R-2.8.1 that I installed using the Windows installer has this dll in 
R-2.8.1/bin, whereas in R-devel it is still in R-devel/src/gnuwin32/unicode. 
Moving the dll  to R-devel/bin alleviates the problem.

I built using the recent recommendations of P. Dalgaard  (make Rpwd.exe, make 
link-recommended, make all recommended). I don't see anything in the NEWS for 
this version, but maybe I missed something?

Best,

Jim

 sessionInfo()
R version 2.9.0 Under development (unstable) (2009-03-11 r48117) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices datasets  utils methods   base 

other attached packages:
[1] XML_1.99-0
-- 

James W. MacDonald, M.S.
Biostatistician
Douglas Lab
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826


**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues

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


[Rd] NAMESPACE/DESCRIPTION and imports

2008-12-14 Thread James MacDonald
Hi,

Could someone point me to the relevant documentation that covers what should be 
in the DESCRIPTION file for packages that have functions imported via the 
NAMESPACE file? I have read the R Extensions manual, but I cannot find where it 
covers the DESCRIPTION file vis a vis importing from a namespace.

An example:

I have a package foo that uses two functions x and y from package bar. Both 
packages have namespaces, and I just want to import the functions from bar 
rather than attaching the package.

I put 

Imports: bar

in my DESCRIPTION file and

importFrom(bar, x, y)

in my NAMESPACE file.

I have a vignette that uses both x and y from bar, and when I run R CMD build 
foo, at the vignette building step it errors out because it cannot find 
function x. If I add

Depends: bar

to my DESCRIPTION file it all works, but bar is attached and it seems I have 
not accomplished what I wanted. I am obviously misunderstanding something but I 
don't know what.

Best,

Jim



James W. MacDonald, M.S.
Biostatistician
Hildebrandt Lab
8220D MSRB III
1150 W. Medical Center Drive
Ann Arbor MI 48109-0646
734-936-8662
**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues

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


[Rd] Is rcompgen still recommended?

2008-02-18 Thread James MacDonald
I just built R-devel from source on OS X (Tiger), using the subversion 
sources. Running ./tools/rsync-recommended didn't download rcompgen. I 
checked

http://cran.r-project/src/contrib/2.7.0/Recommended

and indeed, this package is not there. If I try to install using 
install.packages I get

  install.packages(rcompgen, type=source)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://cran.fhcrc.org/src/contrib/rcompgen_0.1-17.tar.gz'
Content type 'application/x-gzip' length 29240 bytes (28 Kb)
opened URL
==
downloaded 28 Kb

* Installing *source* package 'rcompgen' ...
Error: Invalid DESCRIPTION file

Invalid Priority field.
Packages with priorities 'base' or 'recommended' or 'defunct-base' must
already be known to R.

See the information on DESCRIPTION files in section 'Creating R
packages' of the 'Writing R Extensions' manual.
Execution halted
ERROR: installing package DESCRIPTION failed
** Removing '/Users/jmacdon/R-devel/library/rcompgen'

The downloaded packages are in
/private/tmp/Rtmpb0Refs/downloaded_packages
Updating HTML index of packages in '.Library'
Warning message:
In install.packages(rcompgen, type = source) :
   installation of package 'rcompgen' had non-zero exit status


I assume I am missing something obvious, but don't know what it is. Any 
pointers?

Best,

Jim



  sessionInfo()
R version 2.7.0 Under development (unstable) (2008-02-18 r44516)
i386-apple-darwin8.11.1

locale:
C

attached base packages:
[1] stats graphics  grDevices datasets  utils methods   base

loaded via a namespace (and not attached):
[1] tcltk_2.7.0 tools_2.7.0
-- 
James W. MacDonald, MS
Biostatistician
UMCCC cDNA and Affymetrix Core
University of Michigan
1500 E Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

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


[Rd] Best practices - R CMD check and vignettes

2007-09-19 Thread James MacDonald
Hi,

I have a package that contains two vignettes that both use saved objects 
in the examples directory of the package. With previous versions of R I 
could have a code chunk in the vignette like this:

echo=false=
load(../examples/somedata.Rdata)
@

followed by a code chunk like

eval=false=
foo - bar(data)
@

that simulated the actual reading in of the data (I use a saved object 
to limit package size).

This passed check with previous versions of R, but under R-2.6.0alpha, 
the vignettes are dumped into an inst directory in the package.Rcheck 
directory, where Sweave() and texi2dvi() are run. Unfortunately, the 
above code chunks no longer work.

I can certainly hard code the first chunk to find the .Rdata file, but I 
have to imagine there is a much more elegant way to do this.

Any suggestions?

Best,

Jim


-- 
James W. MacDonald, MS
Biostatistician
UMCCC cDNA and Affymetrix Core
University of Michigan
1500 E Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

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


[Rd] R from SVN fails to build on win32

2007-02-06 Thread James MacDonald
I get the following error when building R from the subversion server as
well as the latest tarball. I am on Windows XP, and I recently updated
my MinGW installation. It's quite possible I am doing something wrong,
but I am not sure what that might be.

making console.d from console.c
making dataentry.d from dataentry.c
making dynload.d from dynload.c
making edit.d from edit.c
making editor.d from editor.c
making embeddedR.d from embeddedR.c
making extra.d from extra.c
making opt.d from opt.c
making pager.d from pager.c
making preferences.d from preferences.c
making psignal.d from psignal.c
making rhome.d from rhome.c
making rui.d from rui.c
making run.d from run.c
making shext.d from shext.c
making sys-win32.d from sys-win32.c
making system.d from system.c
making dos_glob.d from dos_glob.c
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c console.c -o console.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c dataentry.c -o dataentry.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c dynload.c -o dynload.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c edit.c -o edit.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c editor.c -o editor.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c embeddedR.c -o embeddedR.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD -DLEA_MALLOC -c extra.c -o extra.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c opt.c -o opt.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c pager.c -o pager.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c preferences.c -o preferences.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c psignal.c -o psignal.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c rhome.c -o rhome.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c rui.c -o rui.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c run.c -o run.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c shext.c -o shext.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c sys-win32.c -o sys-win32.o
sys-win32.c: In function `do_system': sys-win32.c:183: warning: `hERR'
might be used uninitialized in this function gcc  -O3 -Wall -pedantic
-std=gnu99 -I../include -I. -DHAVE_CONFIG_H -DR_DLL_BUILD  -c system.c
-o system.o
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c dos_glob.c -o dos_glob.o
gcc -c -o e_pow.o e_pow.S
gcc  -O3 -Wall -pedantic -std=gnu99 -I../include -I. -DHAVE_CONFIG_H
-DR_DLL_BUILD  -c malloc.c -o malloc.o
windres  -I ../include -i dllversion.rc -o dllversion.o
c:\MinGW\bin\windres.exe: unknown format type `../include'
c:\MinGW\bin\windres.exe: supported formats: rc res coff make[3]: ***
[dllversion.o] Error 1
make[2]: *** [../../bin/R.dll] Error 2
make[1]: *** [rbuild] Error 2
make: *** [all] Error 2


Best,

Jim



James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues.

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


[Rd] Build error/zlib question

2006-09-28 Thread James MacDonald
Hi,

I am unable to build a package I maintain using a relatively current
build of R-2.4.0 alpha, whereas the package builds just fine on R-2.3.1.
Both versions of R were built from source. I'm hoping a guRu might be
able to give some help.

Some snippets from the build process:

R-2.3.1

  making DLL ...
gcc  -Ic:/R-2.3.1/src/extra/zlib -DHAVE_ZLIB -Ic:/R-2.3.1/include -Wall
-O2   -c read_cdffile.c -o read_cdffile.o
read_cdffile.c: In function `readQC':
read_cdffile.c:565: warning: unused variable `param_unit'
windres --include-dir c:/R-2.3.1/include  -i makecdfenv_res.rc -o
makecdfenv_res.o
gcc  -shared -s  -o makecdfenv.dll makecdfenv.def read_cdffile.o
makecdfenv_res.o  -Lc:/R-2.3.1/bin   -lR
  ... DLL made

R-2.4.0 beta

   making DLL ...
gcc  -Ic:/rw2040dev/src/extra/zlib -DHAVE_ZLIB -Ic:/rw2040dev/include 
-Wall -O2 -std=gnu99   -c read_cdffile.c -o read_cdffile.o
read_cdffile.c: In function `readQC':
read_cdffile.c:565: warning: unused variable `param_unit'
windres --include-dir c:/rw2040dev/include  -i makecdfenv_res.rc -o
makecdfenv_res.o
gcc  -shared -s  -o makecdfenv.dll makecdfenv.def read_cdffile.o
makecdfenv_res.o  -Lc:/rw2040dev/bin   -lR
read_cdffile.o:read_cdffile.c:(.text+0x42): undefined reference to
`gzgets'
read_cdffile.o:read_cdffile.c:(.text+0xf3): undefined reference to
`gzopen'
read_cdffile.o:read_cdffile.c:(.text+0x10f): undefined reference to
`gzgets'
read_cdffile.o:read_cdffile.c:(.text+0x140): undefined reference to
`gzrewind'
read_cdffile.o:read_cdffile.c:(.text+0x177): undefined reference to
`gzclose'
collect2: ld returned 1 exit status
make[3]: *** [makecdfenv.dll] Error 1
make[2]: *** [srcDynlib] Error 2
make[1]: *** [all] Error 2
make: *** [pkg-makecdfenv] Error 2

 version
   _
platform   i386-pc-mingw32  
arch   i386 
os mingw32  
system i386, mingw32
status alpha
major  2
minor  4.0  
year   2006 
month  09   
day10   
svn rev39242
language   R
version.string R version 2.4.0 alpha (2006-09-10 r39242)

TIA,

Jim

James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues.

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


[Rd] Segfault with too many menu items on Rgui

2006-03-31 Thread James MacDonald
Hi all,

In the CHANGES file for R-2.3.0alpha, there is the following
statement:

winMenuAdd() now has no limits on the number of menus or items, and
names are now limited to 500 (not 50) bytes.

However, I can reproducibly get a segfault using this (admittedly
silly) example:

for( i in 1:5) winMenuAdd(paste(Test, letters[i], sep=))
for(i in 1:5) for(j in 1:24) winMenuAddItem(paste(Test, letters[i],
sep=), as.character(j), paste(rep(letters[j], 4), collapse=))

This is probably almost never a problem, but many Bioconductor packages
have vignettes that are added to a 'Vignettes' menu item. If you load
enough of these packages you will get a segfault.

 version
   _  
platform   i386-pc-mingw32
arch   i386   
os mingw32
system i386, mingw32  
status alpha  
major  2  
minor  3.0
year   2006   
month  03 
day29 
svn rev37607  
language   R  
version.string Version 2.3.0 alpha (2006-03-29 r37607)

Best,

Jim



James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues.

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


[Rd] Using .onUnload() to unload compiled code

2006-02-08 Thread James MacDonald
If one wants to unload compiled code for a package containing a namespace, my 
understanding is that .onUnload() should be used, with a call to 
library.dynam.unload(). This is used in e.g., the stats and methods packages, 
but it appears to me that the compiled code is not being unloaded when the 
package is detached(). Am I misunderstanding something?

Best,

Jim

 search()
[1] .GlobalEnvpackage:methods   package:stats 
package:graphics 
[5] package:grDevices package:utils package:datasets  Autoloads 
   
[9] package:base 

 stats:::.onUnload
function (libpath) 
library.dynam.unload(stats, libpath)
environment: namespace:stats

 getLoadedDLLs()
   Filename Dynamic.Lookup
base   base  FALSE
iconvC:/rw2030dev/modules/iconv.dll   TRUE
grDevices C:/rw2030dev/library/grDevices/libs/grDevices.dll  FALSE
stats C:/rw2030dev/library/stats/libs/stats.dll  FALSE
methods   C:/rw2030dev/library/methods/libs/methods.dll  FALSE

 detach(3)

 search()
[1] .GlobalEnvpackage:methods   package:graphics  
package:grDevices
[5] package:utils package:datasets  Autoloads package:base  
   
 getLoadedDLLs()
   Filename Dynamic.Lookup
base   base  FALSE
iconvC:/rw2030dev/modules/iconv.dll   TRUE
grDevices C:/rw2030dev/library/grDevices/libs/grDevices.dll  FALSE
stats C:/rw2030dev/library/stats/libs/stats.dll  FALSE
methods   C:/rw2030dev/library/methods/libs/methods.dll  FALSE

 R.version
   _ 
platform   i386-pc-mingw32   
arch   i386  
os mingw32   
system i386, mingw32 
status Under development (unstable)  
major  2 
minor  3.0   
year   2006  
month  01
day01
svn rev36947 
language   R 
version.string Version 2.3.0 Under development (unstable) (2006-01-01 r36947)


James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



**
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues.

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