Displaying 20 results from an estimated 4000 matches similar to: "Package manpage DCF hooks"
2006 Apr 18
2
Wishlist for promptPackage / index
Hi R-devels,
would it be possible to enhance either promptPackage()
or the default indexing mechanism for packages
so that -- if it exists -- (the contents of) file
<pkgname>-package.Rd is sorted first in
* the .dvi / .pdf documentation file
* the .chm documentation file
* the package 00index.html documentation file
?
So far I found the following "hand-made" solution
2004 Dec 31
4
install.packages() for local source file
Wish to install a local source package on Un*x platform from
within R. Same thing as I can accomplish from cmdline as
$ export R_LIBS=~/R/library
$ cd /path/to/pkg
$ R CMD INSTALL -l $R_LIBS <pkgname>
So, how do you go about this anyway?
And isn't this a bug in 'install.packages'?
-------
$ R
R : Copyright 2004, The R Foundation for Statistical Computing
Version 1.9.0
2004 Jun 22
3
[Q] GET_DIM() crash on Windows only
I have the following contrived code in package format.
On Solaris and Mac OS X, code runs just fine. On Windows,
it crashes the R environment with the "Send Bug Report"
dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries
with the same result. PCs otherwise appear properly
configured for creating R packages. Anything blatantly
wrong? Suggestions?
TIA
Relevant files from package
2005 Nov 12
2
sibling list element reference during list definition
Can the value of a list element be referenced from a
sibling list element during list creation without the use
of a temporary variable?
The following doesn't work but it's the general idea.
> list(value = 2, plusplus = $value+1)
such that the following would be the output from str()
List of 2
$ value : num 2
$ plusplus: num 3
2006 May 03
3
sprintf question
How would one go about getting sprintf to use the
values of a vector without having to specify each
argument individually?
> v <- c(1, 2, -1.197114, 0.1596687)
> iv <- c(3, 1, 2, 4)
> sprintf("%9.2f\t%d\t%d\t%8.3f", v[3], v[1], v[2], v[4])
[1] " -1.20\t1\t2\t 0.160"
Essentially, desired effect would be something like:
>
2006 Mar 29
2
Recall for parent
What's the best way to simulate Recall for parent function?
Consider this one-time recursive code:
alwaysEven <- function(x) {
handleOdd <- function(x) {
alwaysEven(x-1) # use Recall-like here
}
return(if (x %% 2) handleOdd(x) else x)
}
any2even <- alwaysEven
rm(alwaysEven)
any2even(3)
----------------------------------------------------------
SIGSIG --
2006 Apr 06
1
Indexing With List Of Vectors (Replacement)
I have the following:
> a <- matrix(1:10, nrow = 2, byrow = TRUE)
> b <- array(as.integer(0), c(7, 5))
> idx <- list()
> length(idx) <- 2
> dim(idx) <- c(1, 2)
> idx[[1]] <- as.integer(1:2)
> idx[[2]] <- as.integer(1:5)
I can do the following, which works if 'b' is a matrix.
> b[idx[[1]], idx[[2]]] <- a
> b
[,1] [,2] [,3] [,4] [,5]
2006 Apr 12
1
S4 method dispatch matrixOrArray
I have some code where the primary dispatching is on
other parameters so I'd like not to have to create a
set of functions for "matrix" and another duplicate
set for "array". But the class union technique isn't
working as implemented below and I don't have my Green
book with me. How do I fix my infinite recursion problem?
2006 Feb 08
1
invalid graphics state using dev.print (fwd)
On Mon, 6 Feb 2006 18:12, Simon Urbanek wrote:
> On Feb 6, 2006, at 5:24 PM, Paul Roebuck wrote:
>
>> Tried on R-Sig-Mac with no responses, but I need some kind
>> of answer.
>> [...]
>> Does the following work on your system?
>
> Interesting, no, it doesn't either. For png and pdf I use
> Quartz + quartz.save (it produces much nicer results) so
> I
2014 Feb 05
1
R CMD check, NOTEs, & S4-dependent packages
As I was running "R CMD check" on one of my older packages
(matlab), I was attempting to fix one of the NOTEs which
bitches about attempting to change the search path using
require().
In my case, I am repeating a package dependency for "methods"
package in my .onLoad() function. Can this scenario (based
on something B. Ripley discussed many years ago) no longer
occur? Just
2006 May 09
1
YA S4 method dispatch question
I recently encountered this and was wondering if someone
could explain what happened. Basis of question involves
what the difference between the calls makes as the end
result is the same:
> identical(matrix(1:8, nrow = 1), array(1:8, c(1, 8)))
TRUE
If I run the code below as shown, I get the following:
> foo(1:8, 4)
foo (vector, numeric)
val = 4
foo (matrix, ANY)
val = 500
foo
2006 Apr 13
2
[R] S4 method dispatch matrixOrArray (fwd)
What a delicious example! (I'm taking the liberty of sharing it with
r-devel, since it raises some good issues.)
You have two questions, presumably:
1 - how could the order of the setMethod calls make a difference in the
results?
2 - what's causing the infinite loop & how could it be avoided, reliably?
Second question first. The danger sign is the "vector" method:
2006 Feb 21
4
simple C function segfaults
Hello,
I use the simplest of examples that somebody can think
of in order to generate a matrix of random numbers
from within C, calling appropriate R functions. The
concrete example is below:
--- file pico.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <R.h>
#include <Rmath.h>
#define COLM( i, j, m ) ( m*j + i)
void pico ( double *y, int n,
2008 Jun 05
1
doc buglet / as.Date method
Under Details section for as.Date:
as.Date will accept numeric data (the number of days
since an epoch), but only is origin is supplied.
^^
should be "if"
R version 2.7.0 Patched (2008-06-04 r45830)
----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
2006 Oct 27
1
Overloading functions
Hi Everyone
I have a function f which does something using a function g. Function f
is in a library and g has a default stub in the library but will be mainly
overloaded in a later R script. For example:
########## In a compiled package 'P' #################
g <- function() {
cat("Original function g");
}
f <- function( newGsource=NULL ) {
if(
2004 Sep 15
7
Splitting vector into individual elements
Is there a means to split a vector into its individual
elements without going the brute-force route for arguments
to a predefined function call?
offred.rgb <- c(1, 0, 0) * 0.60;
## Brute force style
offred.col <- rgb(offred.rgb[1],
offred.rgb[2],
offred.rgb[3],
names = "offred")
## Desired style
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
I'm attempting to reflect the information for use with corresponding
fields in GUI (in a different package), to provide default values,
argname as key for UI label lookups, etc.
So I want something much more like the formals of the implementation:
{
"object",
"method": c("median", "vs", "tukey"),
2008 Oct 06
2
why is \alias{anRpackage} not mandatory?
Dear R developers,
if one uses package.skeleton() to create a new package, then a file
anRpackage.Rd with the following entries is prepared:
\name{anRpackage-package}
\alias{anRpackage-package}
\alias{anRpackage}
\docType{package}
Packages created this way have a definite entry or overview page, so:
?anRpackage
gives new users of a certain package a pointer where to start reading.
This is
2006 Apr 13
4
Wishlist: 'quietly' argument for .onAttach() / .First.lib()
Hi R-devels,
in "Writing R extensions" as well as in the help
to .onAttach(), you mention that one could
use this function to issue a start-up message/banner
for the package.
My little wish for Easter:
a 'quietly'-type argument for .onAttach() / .First.lib()
which is passed through by functions
require() and library() respectively,
and by means of which one could optionally
2005 Feb 14
2
Test Tools
Anyone aware of tools available that can provide complexity
metrics and/or code coverage analysis for R source?
----------------------------------------------------------
SIGSIG -- signature too long (core dumped)