similar to: PHP escapeshellcmd() equivalent

Displaying 20 results from an estimated 10000 matches similar to: "PHP escapeshellcmd() equivalent"

2011 Jan 12
2
Access R Help Content From R
Have UI that simplifies running code from another (internal) package, allowing user to set values on fields I basically grabbed from results of calls to formals() for various functions. That works fine for the most part. But it was requested to investigate some type of popup help or something for each field. Since I already wrote the information in the dot-Rd files for what should be displayed,
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:
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"),
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
2010 Aug 24
1
save() object w/o all of the loaded environment
I have two packages, one that does the actual work (SC) and the other a Tcl/Tk UI (SCUI) that invokes methods within the former. Within the SCUI's invocation method, I save an object returned from SC, the results of a long-running method. Now the object is completely described by the SC package. Unfortunately, any attempt to load the object (in a fresh R session) fails as below. R>
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package. >norm.meth <- getMethod("normalize", "MatrixLike") >message("str(norm.meth)") >str(norm.meth) >message("show(norm.meth at .Data)") >show(norm.meth at .Data) Last show() displays this: function (object, ...) { .local <- function (object, method = c("median",
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: >
2015 Jan 29
3
[Q] Get formal arguments of my implemented S4 method
On Jan 28, 2015, at 6:37 PM, Michael Lawrence <lawrence.michael at gene.com> wrote: > At this point I would just due: > > formals(body(method)[[2L]]) > > At some point we need to figure out what to do with this .local() confusion. Agreed, definitely. The current hack is to avoid re-matching arguments on method dispatch, so a fix would need to be fairly deep in the
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 --
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
2008 Oct 08
2
Weird problem in PHP 5.1.6/possible bug
I hit a weird problem with the default PHP 5.1.6 on CentoS 5.2. It seems the default 5.1.6 PHP on CentOS has a bug in the functions escapeshellargs/escapeshellcmd: it "gulps" any special (non-ASCII) characters, so that they are missing from the output. I have been assured that this does not happen on other 5.1.6 or newer on other Linux distributions. I don't see this behavior
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
2005 Nov 14
1
Package manpage DCF hooks
Was looking at what was output for <pkgname>-package.Rd and wondered if any there was any means (via macro, etc) to merge some of the same information with a template for my package manpage? As much (all?) of the generated information was already provided in the DESCRIPTION, I'd prefer not to have to update the information in multiple places. I'm thinking here that I could provide a
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(
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 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,
2012 Apr 12
1
R-2.15.0 and Exporting Methods Converted To S4 Generic
Late to the show on this release, unfortunately. One of our production packages no longer builds under R-2.15.0 with the following message. ** testing if installed package can be loaded Error: Function found when exporting methods from the namespace 'SuperCurve' which is not S4 generic: 'image' Possibly relevant clues follow: ## From R/AllGenerics.R if
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
2003 May 30
1
[Q] R equivalent for Splus get.message()
I'm trying to get a translation of some Splus code going. My problem is with the S-plus get.message() function not existing in R. Is there a replacement or alternative? ErrorHandler.func<-function() { cat("app.terminated\n"); cat(paste("err.fatal",get.message(),"\n",sep="")); dump.calls(); } options(error=ErrorHandler.func)