search for: jumptrading

Displaying 20 results from an estimated 38 matches for "jumptrading".

Did you mean: jumpthreading
2007 Dec 17
1
names in Rscript -e
Hi, I seem to have a problem when passing named parameters to R via Rscript (R2.5.1, bash shell). As soon as I name elements of a list Rscript generates an error. I will appreciate if someone could point to me a correct way of doing this. Thanks, Vadim ## This works bash-3.2$ Rscript.exe -e 'list(1)' [[1]] [1] 1 # and these do not work bash-3.2$ Rscript.exe -e
2008 Mar 04
1
making array of lists
Dear R Users, Given two vectors, say a = seq(2) and b = seq(3), I want to make an 2*3 array, where (i,j) element is list(a=a[i], b=b[j]). I tried the outer() function but it generates an error message that I don't understand, see below. What do I do wrong? The expan.grid function is not good enough since I need a solution that works when a and b are not atomic, say a=list(list(x=1,
2007 May 18
1
subset arg in (modified) evalq
Hi, When using evalq to evaluate expressions within a say data.frame context I often wish there was a 'subset' argument, much like in lm() or any ather advanced regression model. I would be grateful for a tip how to do this. Here is an illustration of what I want: n <- 100 data <- data.frame(x=rnorm(n), y=rnorm(y), z=rnorm(z)) # this works evalq({ i <- 0<x;
2008 Feb 15
0
crash in library(gbm) was: Rscript temp file
...Does anyone have an idea what that might mean? I am not able to reproduce it in controlled environment. This is Windows. Thanks, Vadim ________________________________________ From: r-devel-bounces at r-project.org [r-devel-bounces at r-project.org] On Behalf Of Vadim Organovich [vogranovich at jumptrading.com] Sent: Friday, February 15, 2008 2:29 PM To: r-devel at r-project.org Subject: [Rd] Rscript temp file Hi, It seems that Rscript creates a temporary file to store the commands passed with the -e option, under normal circumstances the temp file gets deleted at some point. Here is an example...
2008 Sep 04
1
lapply(NULL, ...) returns empty list
Dear R-devel, Is there a reason that lapply(NULL, ...) returns the empty list, rather than NULL? It seems intuitive to expect the latter, and rather counterintuitive that lapply(list(), ... ) returns the same value as lapply(NULL, ...). > lapply(list(), function(x) 1) list() > lapply(NULL, function(x) 1) list() > version _ platform i386-pc-mingw32 arch
2007 May 03
2
convert text to exprission good for lm arguments
Hi, I ran into a problem of converting a text representation of an expression into parsed expression to be further evaluated inside lm (). > n <- 100 > data <- data.frame(x= rnorm (n), y= rnorm (n)) > data. lm <- lm (y ~ x, data=data) > > ## this works > update(data. lm , subset=x<0) Call: lm (formula = y ~ x, data = data, subset = x < 0)
2010 Oct 15
1
calling browser on error
Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: > f <- function() { x <- 1; stop('ok') } > tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment
2008 Aug 20
1
names of return value of median
Dear R-devel, The median() function assigns a name, "NA", to its return value if the return value is NA and the input vector has names, otherwise the names attribute is NULL. This looks strange and inconsistent with the behavior of mean(). This inconsistency becomes a problem when median() is used inside user code that relies on consistent naming convention. Thanks, Vadim > foo
2007 Feb 14
1
Snow vs Rmpi
Hi, I have few high-level questions about the Snow and Rmpi packages . I understand that Snow uses Rmpi as one of possible transport layers, yet my questions about user experience, not technical details: 1. Does Snow install and work well in Windows? 2. Interruptibility. I understand that currently it is impossible to interrupt a running top-level command in Snow ( Ctl-c or the likes), the
2008 Feb 25
1
how to write dput-able objects
Hi, One way of doing object-oriented programming in R is to use function environment to hold object's data, see for example @Article{Rnews:Chambers+Lang:2001a, author = {John M. Chambers and Duncan Temple Lang}, title = {Object-Oriented Programming in {R}}, journal = {R News}, year = 2001, volume = 1, number = 3, pages = {17--19},
2009 Jul 21
1
subscript into matrix discards row/column names
Dear R-help, When the result of a matrix subscription degenerates to a scalar the names implied by the dimnames are discarded. > x <- matrix(0, 1, 1, dimnames=list('a', 'x')) ## below I expected result to have names='x', it's not > x[1,] [1] 0 ## below I expected result to have names='a', it's not > x[,1] [1] 0 This is probably a side effect
2008 Nov 28
1
names generated in list indexing
Dear R-devel, When a character vector is used to subscript a list and when some of the subscripts are not present in the list names R returns NULL for those subscripts and generate NA names for each of them: > list(b=1)[c('a','b')] $<NA> <<-- generated name NULL $b [1] 1 Wouldn't it be more intuitive to use the subscript name rather than to generate an NA?
2010 Jul 22
1
decision tree with weighted inputs
I'd like to train a decision tree on a set of weighted data points. I looked into the rpart package, which builds trees but doesn't seem to offer the capability of weighting inputs. (There is a weights parameter, but it seems to correspond to output classes rather than to input points). I'm making do for now by preprocessing my input data by adding multiple instances of each data
2008 Oct 03
2
computing on expressions
Dear R-users, Suppose I have an expression: expr = expression(a>0) and now I want to modify it to expression(a>0 & b>0). The following doesn't work: expr = expression(expr & b>0) What would be a good way of doing this? Thanks, Vadim ________________________________ Note: This email is for the confidential use of the named addressee(s) only and may contain
2008 Mar 21
2
writintg wrappers around save()
Dear R-users, I am trying to write a wrapper function around save() that will report the file which is being saved to. So I thought that the followintg would do the trick, but it doesn't. I understand that 'y' is somehow not visible inside save.verbose, but don't know how to fix this. save.verbose <- function(..., file) { cat("save.verbose:", file, "\n")
2010 Jun 26
2
subset arg in subset(). was: converting result of substitute to 'ordidnary' expression
Dear R users, Please disregard my previous post "converting result of substitute to 'ordidnary' expression". The problem I have has nothing to do with substitute. Consider: > dat <- data.frame(x=1:10, y=1:10) > subsetexp <- expression(5<x) > ## this does work > subset(dat, eval(subsetexp)) x y 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 > ##
2010 Dec 23
2
data frame with nested data frame
Dear R-users, I am somewhat puzzled by how R treats data frames with nested data frames. Below are a couple of examples, maybe someone could help explain what the guiding logic here is. ## construct plain data frame > z <- data.frame(x=1) ## add a data frame member > z$y <- data.frame(a=1,b=2) ## puzzle 1: z is apparently different from a straightforward construction of the
2010 Jun 26
3
converting result of substitute to 'ordidnary' expression
Dear R users, As substitute() help page points out: Substituting and quoting often causes confusion when the argument is 'expression(...)'. The result is a call to the 'expression' constructor function and needs to be evaluated with 'eval' to give the actual expression object. And indeed I am confused. Consider: > dat <- data.frame(x=1:10,
2010 Jun 26
3
converting result of substitute to 'ordidnary' expression
Dear R users, As substitute() help page points out: Substituting and quoting often causes confusion when the argument is 'expression(...)'. The result is a call to the 'expression' constructor function and needs to be evaluated with 'eval' to give the actual expression object. And indeed I am confused. Consider: > dat <- data.frame(x=1:10,
2007 Nov 14
0
Piecewise Linear Regression
Hi, Let me pick up this old thread. How does one extract the locations of the knots (ends of the segments) from the fit object below? Thanks, Vadim >From : roger koenker < roger_at_ysidro.econ.uiuc.edu > Date : Tue 31 May 2005 - 10:23:19 EST It is conventional to fit piecewise linear models by assuming Gaussian error and using least squares methods, but one can argue that