Re: [Rd] Rd2dvi pagination of index in pdf manual

2010-04-29 Thread peter dalgaard

On Apr 29, 2010, at 6:25 AM, Prof Brian Ripley wrote:

> On Thu, 29 Apr 2010, Murray Efford wrote:
> 
>> Peter's solution works perfectly. Thanks. Maybe this should be standard.
> 
> It is for now, but the intention is to use the more general solution of 
> texi2dvi.
> 

Thanks, Brian.

I'm not actually sure that we need the fourth pdflatex pass (i.e., maybe 
makeindex just kicked in too soon), so the fix was defensive. It will do for 
now, though, if things are going to change.

-pd
-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

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


Re: [Rd] bug in cut.POSIXt(..., breaks = < numeric> ) and cut.Date

2010-04-29 Thread Ben Bolker
Felix Andrews  nfrac.org> writes:

> 
> x <- seq(as.POSIXct("2000-01-01"), by = "days", length = 20)
> 
> cut(x, breaks = 3)
> # Error in `levels<-.factor`(`*tmp*`, value = character(0)) :
> #   number of levels differs
> 
> cut(as.Date(x), breaks = 3)
> # Error in `levels<-.factor`(`*tmp*`, value = character(0)) :
> #   number of levels differs


  Is this the same?

http://article.gmane.org/gmane.comp.lang.r.devel/22155/match=cut+posixt

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


[Rd] small mistake of tcltk

2010-04-29 Thread Ei-ji Nakama
Hi,

All Japanese encoding was all right if fixed the following.

--- R-2.11.0.orig/src/library/tcltk/src/tcltk.c 2010-03-31
07:10:02.0 +0900
+++ R-2.11.0.work/src/library/tcltk/src/tcltk.c 2010-04-29
23:48:55.0 +0900
@@ -349,7 +349,7 @@
elem = Tcl_NewObj();
Tcl_DStringInit(&s_ds);
s = Tcl_ExternalToUtfDString(encoding,
-(Cchar *) 
translateChar(STRING_ELT(val, i)),
+(Cchar *) 
translateCharUTF8(STRING_ELT(val, i)),
 -1, &s_ds);
Tcl_SetStringObj(elem, s, -1);
Tcl_DStringFree(&s_ds);

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

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


[Rd] R CMD check Error after R CMD build for R-2.11.0

2010-04-29 Thread Hamid Khalili
Dear UseR,

I get an error when I run "R CMD check" on my .tar.gz file package,
and I don't  understand why since I don't obtain any error with "R CMD
check" on the package directory. Do you have any idea ?

$ sudo ./R-2.11.0/bin/R CMD check eqtl_1.1.tar.gz

and

$ sudo ./R-2.11.0/bin/R CMD --check-subdirs=no eqtl_1.1.tar.gz

return an Error

* checking for working pdflatex ... OK
* using log directory '/home/hkhalili/Desktop/eqtl.Rcheck'
* using R version 2.11.0 (2010-04-22)
* using session charset: UTF-8
* checking for file 'eqtl/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'eqtl' version '1.1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'eqtl' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking data for non-ASCII characters ... OK
* checking examples ... ERROR
Running examples in 'eqtl-Ex.R' failed.
The error most likely occurred in:

> ### * Rsq.2.array
>
> flush(stderr()); flush(stdout())
>
> ### Name: Rsq.2.array
> ### Title: Add R square data to peak.array data frame
> ### Aliases: Rsq.2.array
>
> ### ** Examples
>
> data(seed10);
>
> # Genome scan and QTL detection
> out.em <- scanone(seed10, pheno.col=1:50, model='normal', method='em');
Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
  Dropping 263 individuals with missing phenotypes.

Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
  Dropping 263 individuals with missing phenotypes.

Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
  Dropping 263 individuals with missing phenotypes.

> out.peak <- define.peak(out.em, 'all');
Error: could not find function "define.peak"
Execution halted

The Warnings in checkcovar are normal warnings (from the required
package 'qtl'). The function "define.peak" is part of the package I'm
checking (eqtl) and its Rd and R files are checked before
"Rsq.2.array" function without any Error.
The functions' example running the same commands line with define.peak
didn't return any Error.

$ sudo ./R-2.11.0/bin/R CMD  check --check-subdirs=yes eqtl

and

$ sudo ./R-2.11.0/bin/R CMD check eqtl/

return no error

* checking for working pdflatex ... OK
* using log directory '/home/hkhalili/Desktop/eqtl.Rcheck'
* using R version 2.11.0 (2010-04-22)
* using session charset: UTF-8
* checking for file 'eqtl/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'eqtl' version '1.1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'eqtl' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking data for non-ASCII characters ... OK
* checking examples ... OK
* checking PDF version of manual ... OK

$ ./R-2.11.0/bin/R CMD build /media/HAMID/eqtl
* checking for file '/media/HAMID/eqtl/DESCRIPTION' ... OK
* preparing '/media/HAMID/eqtl':
* checking DESCRIPTION meta-information ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'eqtl_1.1.tar.gz'


> sessionI

Re: [Rd] R CMD check Error after R CMD build for R-2.11.0

2010-04-29 Thread Uwe Ligges



On 29.04.2010 17:39, Hamid Khalili wrote:

Dear UseR,

I get an error when I run "R CMD check" on my .tar.gz file package,
and I don't  understand why since I don't obtain any error with "R CMD
check" on the package directory. Do you have any idea ?

$ sudo ./R-2.11.0/bin/R CMD check eqtl_1.1.tar.gz

and

$ sudo ./R-2.11.0/bin/R CMD --check-subdirs=no eqtl_1.1.tar.gz

return an Error

* checking for working pdflatex ... OK
* using log directory '/home/hkhalili/Desktop/eqtl.Rcheck'
* using R version 2.11.0 (2010-04-22)
* using session charset: UTF-8
* checking for file 'eqtl/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'eqtl' version '1.1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'eqtl' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking data for non-ASCII characters ... OK
* checking examples ... ERROR
Running examples in 'eqtl-Ex.R' failed.
The error most likely occurred in:


### * Rsq.2.array

flush(stderr()); flush(stdout())

### Name: Rsq.2.array
### Title: Add R square data to peak.array data frame
### Aliases: Rsq.2.array

### ** Examples

data(seed10);

# Genome scan and QTL detection
out.em<- scanone(seed10, pheno.col=1:50, model='normal', method='em');

Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
   Dropping 263 individuals with missing phenotypes.

Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
   Dropping 263 individuals with missing phenotypes.

Warning in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  :
   Dropping 263 individuals with missing phenotypes.


out.peak<- define.peak(out.em, 'all');

Error: could not find function "define.peak"
Execution halted

The Warnings in checkcovar are normal warnings (from the required
package 'qtl'). The function "define.peak" is part of the package I'm
checking (eqtl) and its Rd and R files are checked before
"Rsq.2.array" function without any Error.


Are you sure about the spelling? Do you have a namespace and forgot to 
export?


Uwe Ligges



The functions' example running the same commands line with define.peak
didn't return any Error.

$ sudo ./R-2.11.0/bin/R CMD  check --check-subdirs=yes eqtl

and

$ sudo ./R-2.11.0/bin/R CMD check eqtl/

return no error

* checking for working pdflatex ... OK
* using log directory '/home/hkhalili/Desktop/eqtl.Rcheck'
* using R version 2.11.0 (2010-04-22)
* using session charset: UTF-8
* checking for file 'eqtl/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'eqtl' version '1.1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'eqtl' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking data for non-ASCII characters ... OK
* checking examples ... OK
* checking PDF version of manual ... OK

$ ./R-2.11.0/bin/R CMD build /media/HAMID/eqtl
* checking for file '/media/HAMID/eqtl/DESCRIPTION' ... OK
* preparing '/media/HAMID/eqtl':
* checking DESCRIPTION meta-information ... OK
* removing junk files
* checking for LF 

[Rd] Memory allocation in C/C++ vs R?

2010-04-29 Thread Dominick Samperi
The R docs say that there are two methods that the C programmer can
allocate memory, one where R automatically frees the memory on
return from .C/.Call, and the other where the user takes responsibility
for freeing the storage. Both methods involve using R-provided
functions.

What happens when the user uses the standard "new" allocator?
What about when a C++ application uses STL and that library
allocates memory? In both of these cases the R-provided functions
are not used (to my knowledge), yet I have not seen any problems.

How is the memory that R manages and garbage collects kept
separate from the memory that is allocated on the C++ side
quite independently of what R is doing?

Thanks,
Dominick

[[alternative HTML version deleted]]

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