[R] automatically calling dev.off()

2015-09-01 Thread axionator
Hi, is there a way to automatically call dev.off()? I use options(device="myfunc") to automatically open a device to print to. Afterwards, I would like to close it (so that the file is actually written). I tried to do it via addTaskCallback, but unfortunately, I have to use Rserve and (for any

Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
5 7:34 AM, axionator wrote: > > Hi, > > is there a way to automatically call dev.off()? > > I use options(device="myfunc") to automatically open a device to print > to. > > Afterwards, I would like to close it (so that the file is actually > written). > >

Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
; Research Engineer (Solar/BatteriesO.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On

Re: [R] automatically calling dev.off()

2015-09-01 Thread axionator
Yes, it's a different model, but maybe my main problem is that Rserve does not handle addTaskCallback as in the console (and thus no dev.off() is called). On Tue, Sep 1, 2015 at 5:00 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: > On 01/09/2015 10:13 AM, axionator wrote: > >

[R] lbfgsb from C

2012-10-28 Thread axionator
Hi, I wanted to use R's lbfgsb method for minimization from C. Unfortunately, my toy examples always crashes (segmentation fault). What's wrong with it? double eval(int n, double* par, void *ex) { double result = 0; for (int i=0; in; ++i) { result += par[i]*par[i]; }

Re: [R] contour plot

2009-07-23 Thread axionator
That problem is that for every y I get a different x and thus cant create an array as in the help page examples. I was just wondering, whether there is a possibility to create such a contour plot easily without having to spend too much time with setting up a suitable matrix manually. Armin

[R] contour plot

2009-07-22 Thread axionator
Hi, I want to draw a contour plot of the following function: z = y*x + epsilon, where x ~ N(y, 1) and epsilon ~ N(0, sigma) with sigma fixed (e.g. 1) But didnt manage to feed contour with the right input. Thanks for your help. Armin __

[R] counting entries in vector

2009-02-04 Thread axionator
Hi all, I've a vector with entries, which are all of the same type, e.g. string: k - c(bb, bb, bb, aa, cc, cc) and want to create a second vector containing the number of each entry in k in the same order as in k, i.e. c(3, 1, 2) or: k - c(5,5,5,5,2,2,4) = c(4,2,1) thanks

Re: [R] counting entries in vector

2009-02-04 Thread axionator
rle(k)$lengths is perfectly suitable for my purposes. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] Simplex function in R

2008-12-11 Thread axionator
Hi, in the first example, your feasible set is just one point (the one that fulfills the 3 equations) and thus there is only this one point which can maximize the objective function. In the second case, the feasible set is a line. But the simplex algorithm tries to find an optimizing value of the

[R] Quantile Regression for longitudinal data

2008-12-05 Thread axionator
Hi all, does anybody know about R implementations for quantile regression for longitudinal data? I am just aware of a very basic version of R. Koenker's approach using fixed effects. Thanks in advance Armin __ R-help@r-project.org mailing list

Re: [R] sampling from data.frame

2008-12-03 Thread axionator
sorry for being a little bit imprecise, Chuck interpreted my question as desired. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] sampling from data.frame

2008-12-02 Thread axionator
Hi all, I have a data frame with clustered rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... cluster-size is 3 in the example above (rows making up a

Re: [R] optimization problem

2008-11-28 Thread axionator
Hi, I guess your function has several local minima and depending on where you start, i.e. your initial variables, you get into another mimimum. HTH Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] construct a vector

2008-11-26 Thread axionator
Thanks, works fine. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] construct a vector

2008-11-26 Thread axionator
Hi all, I have an unkown number of vectors (=2) all of the same length. Out of these, I want to construct a new one as follows: having vectors u,v and w, the resulting vector z should have entries: z[1] = u[1], z[2] = v[1], z[3] = w[1] z[4] = u[2], z[5] = v[2], z[6] = w[2] ... i.e. go through the