[Rd] Package manual Tex file

2014-08-15 Thread Axel Urbiz
Dear All,

My apologies if the question is ambiguous.

I can create the pdf manual from a package I've built from "R CMD check
fooPackage". Is there a way to get the Tex file for the package manual pdf?
Well, I presume there is Tex code "behind" a package manual pdf file. But
if so, how can I get it?

I'm on Mac OS.


Thanks,
Axel.

[[alternative HTML version deleted]]

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


Re: [Rd] Package manual Tex file

2014-08-15 Thread Duncan Murdoch
On 14/08/2014, 8:51 PM, Axel Urbiz wrote:
> Dear All,
> 
> My apologies if the question is ambiguous.
> 
> I can create the pdf manual from a package I've built from "R CMD check
> fooPackage". Is there a way to get the Tex file for the package manual pdf?
> Well, I presume there is Tex code "behind" a package manual pdf file. But
> if so, how can I get it?
> 
> I'm on Mac OS.

In the shell, run

R CMD Rd2pdf --no-clean fooPackage

Duncan Murdoch

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


Re: [Rd] Request to review a patch for rpart

2014-08-15 Thread Gabriel Becker
Kirill,

Perhaps I'm just being obtuse, but what are you proposing rpart do in the
case of an empty model?  Return a "tree" that always guesses the most
common label, or doesn't guess at all (NA)? It doesn't seem like you'd need
rpart for either of those.

~G


On Wed, Aug 13, 2014 at 3:51 AM, Kirill Müller <
kirill.muel...@ivt.baug.ethz.ch> wrote:

> Dear list
>
>
> For my work, it would be helpful if rpart worked seamlessly with an empty
> model:
>
> library(rpart); rpart(formula=y~0, data=data.frame(y=factor(1:10)))
>
> Currently, an unrelated error (originating from na.rpart) is thrown.
>
> At some point in the near future, I'd like to release a package to CRAN
> which uses rpart and relies on that functionality. I have prepared a patch
> (minor modifications at three places, and a test) which I'd like to propose
> for inclusion in the next CRAN release of rpart. The patch can be reviewed
> at https://github.com/krlmlr/rpart/tree/empty-model, the files (based on
> the current CRAN release 4.1-8) can be downloaded from
> https://github.com/krlmlr/rpart/archive/empty-model.zip.
>
> Thanks for your attention.
>
>
> With kindest regards
>
> Kirill Müller
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis

[[alternative HTML version deleted]]

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


Re: [Rd] Request to review a patch for rpart

2014-08-15 Thread Kirill Müller

Gabriel


Thanks for your feedback. Indeed, I was not particularly clear here. The 
empty model is just a very special case in a more general setting. I'd 
have to work around this deficiency in my code -- sure I can do that, 
but I thought a generic solution should be possible. In particular, I'm 
using predict.rpart(..., type = "prob") -- this just reflects the 
observed relative frequencies.



Cheers

Kirill


On 08/15/2014 06:44 PM, Gabriel Becker wrote:

Kirill,

Perhaps I'm just being obtuse, but what are you proposing rpart do in 
the case of an empty model?  Return a "tree" that always guesses the 
most common label, or doesn't guess at all (NA)? It doesn't seem like 
you'd need rpart for either of those.


~G


On Wed, Aug 13, 2014 at 3:51 AM, Kirill Müller 
> wrote:


Dear list


For my work, it would be helpful if rpart worked seamlessly with
an empty model:

library(rpart); rpart(formula=y~0, data=data.frame(y=factor(1:10)))

Currently, an unrelated error (originating from na.rpart) is thrown.

At some point in the near future, I'd like to release a package to
CRAN which uses rpart and relies on that functionality. I have
prepared a patch (minor modifications at three places, and a test)
which I'd like to propose for inclusion in the next CRAN release
of rpart. The patch can be reviewed at
https://github.com/krlmlr/rpart/tree/empty-model, the files (based
on the current CRAN release 4.1-8) can be downloaded from
https://github.com/krlmlr/rpart/archive/empty-model.zip.

Thanks for your attention.


With kindest regards

Kirill Müller

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




--
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis


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


Re: [Rd] `*tmp*`

2014-08-15 Thread Peter Meilstrup
AFAIK there is not supposed to be any user level code that depends on the 
existence of *tmp*, but there are knock-on effects (evaluating code in a locked 
environment can succeed with byte code and fail with the interpreter, for 
instance)

Peter

> On Aug 14, 2014, at 14:35, Michael Haupt  wrote:
> 
> Hi Luke,
> 
>> Am 14.08.2014 um 12:08 schrieb luke-tier...@uiowa.edu:
>> This is a consequence of the tricks the interpreter implementation
>> currently plays to do complex assignments. Compiled code works
>> differently:
>> 
>>> library(compiler)
>>> cmpfun(function() {
>> +x<-c(1,2)
>> +x[1]<-42
>> +`*tmp*`[1]<-7 # I would expect this one to fail
>> + })()
>> Error in cmpfun(function() { : object '*tmp*' not found
> 
> aha, thank you very much! So the behaviour of the AST and bytecode 
> interpreters differ. Which one is authoritative? Can I cherry-pick? (I'll 
> pick the bytecode interpreter's version if I may.)
> 
> Is there actually any code out there that *uses* `*tmp*` and would hence 
> break if the bytecode interpreter was used? Is it encouraged to not directly 
> access `*tmp*`?
> 
> I'm asking all these questions because, in FastR, we're currently quite 
> closely mirroring the AST interpreter's behaviour for complex assignments - 
> if this is not an absolute must-have, I'd be very happy about being able to 
> apply a much leaner implementation instead.
> 
> Best,
> 
> Michael
> 
> -- 
> Dr. Michael Haupt
> Principal Member of Technical Staff
> Phone: +49 331 200 7277, Fax: +49 331 200 7561
> Oracle Labs
> Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germany
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

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


Re: [Rd] Package manual Tex file

2014-08-15 Thread Axel Urbiz
Hi Duncan,


Thanks for your response.


The command  "R CMD Rd2pdf --no-clean fooPackage" is creating the pdf file
with the package manual but not the .tex file. I find this odd given that
the following is part of the log:


"Hmm ... looks like a package

Converting Rd files to LaTeX .

Creating pdf output from LaTeX ...

(/Users/package manual/.Rd2pdf14087/Rd2.tex

LaTeX2e <2009/09/24>"


I don't see the .Rd2pdf14087 folder (Note also that I'm on Mac OS and I set
the options to see all hidden files).


Alternatively, the command below successfully creates the .tex file for me.
However, I wonder if there is a way to do this for all .Rd files at once
(including the DESCRIPTION file).


R CMD Rdconv -o fooFUN.tex --type=latex fooFUN.Rd



Thanks again for your help,

Axel.


On Fri, Aug 15, 2014 at 6:31 AM, Duncan Murdoch 
wrote:

> On 14/08/2014, 8:51 PM, Axel Urbiz wrote:
> > Dear All,
> >
> > My apologies if the question is ambiguous.
> >
> > I can create the pdf manual from a package I've built from "R CMD check
> > fooPackage". Is there a way to get the Tex file for the package manual
> pdf?
> > Well, I presume there is Tex code "behind" a package manual pdf file. But
> > if so, how can I get it?
> >
> > I'm on Mac OS.
>
> In the shell, run
>
> R CMD Rd2pdf --no-clean fooPackage
>
> Duncan Murdoch
>

[[alternative HTML version deleted]]

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


Re: [Rd] Package manual Tex file

2014-08-15 Thread Duncan Murdoch
On 15/08/2014, 4:47 PM, Axel Urbiz wrote:
> Hi Duncan, 
> 
> 
> Thanks for your response.
> 
> 
> The command  "R CMD Rd2pdf --no-clean fooPackage" is creating the pdf
> file with the package manual but not the .tex file. I find this odd
> given that the following is part of the log:
> 
> 
> "Hmm ... looks like a package
> 
> Converting Rd files to LaTeX .
> 
> Creating pdf output from LaTeX ...
> 
> (/Users/package manual/.Rd2pdf14087/Rd2.tex
> 
> LaTeX2e <2009/09/24>"
> 
> 
> I don't see the .Rd2pdf14087 folder (Note also that I'm on Mac OS and I
> set the options to see all hidden files).
> 

I don't see what you describe.  On Mac OS I see this output:

$ R CMD Rd2pdf --no-clean tables
Hmm ... looks like a package
Converting Rd files to LaTeX ..
Creating pdf output from LaTeX ...

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode
(/Users/murdoch/svn/MyR/.Rd2pdf4517/Rd2.tex

[ many lines deleted ]

Output written on Rd2.pdf (23 pages, 134164 bytes).
Transcript written on Rd2.log.
Saving output to 'tables.pdf' ...
Done
You may want to clean up by 'rm -rf .Rd2pdf4517'

murdoch@djmair ~/svn/MyR
$ cd .Rd2pdf4517/

murdoch@djmair ~/svn/MyR/.Rd2pdf4517
$ ls
Rd2.aux  Rd2.ilg  Rd2.log  Rd2.pdf  Rd2.toc
Rd2.idx  Rd2.ind  Rd2.out  Rd2.tex

Duncan Murdoch

> 
> Alternatively, the command below successfully creates the .tex file for
> me. However, I wonder if there is a way to do this for all .Rd files at
> once (including the DESCRIPTION file).
> 
> 
> R CMD Rdconv -o fooFUN.tex --type=latex fooFUN.Rd
> 
> 
> 
> Thanks again for your help,
> 
> Axel.
> 
> 
> 
> On Fri, Aug 15, 2014 at 6:31 AM, Duncan Murdoch
> mailto:murdoch.dun...@gmail.com>> wrote:
> 
> On 14/08/2014, 8:51 PM, Axel Urbiz wrote:
> > Dear All,
> >
> > My apologies if the question is ambiguous.
> >
> > I can create the pdf manual from a package I've built from "R CMD
> check
> > fooPackage". Is there a way to get the Tex file for the package
> manual pdf?
> > Well, I presume there is Tex code "behind" a package manual pdf
> file. But
> > if so, how can I get it?
> >
> > I'm on Mac OS.
> 
> In the shell, run
> 
> R CMD Rd2pdf --no-clean fooPackage
> 
> Duncan Murdoch
> 
>

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


Re: [Rd] Compilation problems

2014-08-15 Thread André Z . D . A .
It is not a virtual machine. But every process has it's memory limited. And 
Java will insanely (try to) reserve 1/4 of memory for its heap on every run, by 
default. Ugly language, that would be at least 3GB on this server. So the fix 
is -Xms and -Xmx passed using _JAVA_OPTIONS variable. Now it happily runs 
saying:

"Picked up _JAVA_OPTIONS: -Xmx64m -Xms6m"



> I have seen this error before when running java inside a vm container
> (openvz, lxc) where the kernel does not give java permission to query
> the amount of available memory, and hence java assumes it must be 0.
> In these cases you need to manually set the MaxHeapSize by passing a
> parameter to java, see:
> http://stackoverflow.com/questions/4401396/could-not-reserve-enough-space-for-object-heap.
> 
> I am not sure where in the compilation that java gets invoked, and if
> there is a way to pass parameters. Perhaps you can use the
> _JAVA_OPTIONS environment variable.

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