Displaying 20 results from an estimated 20000 matches similar to: "R 'function' as "subroutine""
2010 May 12
6
A primitive OO in R -- where next?
Greetings All,
Out of curiosity, I've just done a very primitive experiment:
Obj <- list(Fun=sum, Dat=c(1,2,3,4))
Obj$Fun(Obj$Dat)
# [1] 10
That sort of thing (much more sophisticated) must be documented
mind-blowingly somewhere. Where?
Where I stand right now: The above (and its immediately obvious
generalisations, like Obj$Fun<-cos) is all I know about it so far.
Ted.
2003 Oct 20
2
win.metafile and Linux
Hi Folks,
I see that people have been discussing the win.metafile device
on the list since before 2000.
Yet I have never seen this on a Linux distribution of R.
Is this because the device works by making calls (GPL calls of
course!) to a proprietary Windows library?
In that case I can understand that it would be far from kosher to
implement it on Linux. But I'd like confirmation.
I must
2007 Oct 19
6
r achives
sorry but how do i accsess r archives
__________________________________________________
[[alternative HTML version deleted]]
2010 Jun 18
4
Drawing sample from a circle
Hi, I would like to draw 10 uniformly distributed sample points from a circle with redius one and centered at (0,0). Is there any R function to do that?
Thanks,
[[alternative HTML version deleted]]
2010 Sep 19
3
OT Gmane and r-help moderator approval
I have started to read r-help on Gmane using Thunderbird as a reader.
Before that I had messages sent to gmail account.
The first post through Gmane needed moderator approval, but then I got a
message from
Your friendly autoauthorizer at Gmane.org
saying
You are now authorized to post to the
gmane.comp.lang.r.general newsgroup.
But my messages are still needing moderator approval, which I
2008 Apr 28
3
R on X11 under Linux (newbie)
I just installed R on my 64 bit SUSE Linux system -- I compiled with the default x windows support on..
This may be a newbie question (apologies in advance)-- but how does this show up in X?
I have SSH'd in to my box and set my display -- I can run xcalc OK -- but when I hit the R binary it just goes to the command line -- if does not give me an x-window.
I suspect I need another
2009 Feb 23
1
Interleave or not
Lets say you had 4 servers and you wanted to setup replicate and
distribute. What methoid would be better:
server sdb1
xen0 brick0
xen1 mirror0
xen2 brick1
xen3 mirror1
replicate block0 - brick0 mirror0
replicate block1 - brick1 mirror1
distribute unify - block0 block1
or
server sdb1 sdb2
xen0 brick0 mirror3
xen1 brick1 mirror0
xen2 brick2 mirror1
xen3 brick3 mirror2
replicate block0 -
2009 Feb 05
3
"open-ended" plot limits?
Hi Folks,
Maybe I've missed it already being available somehow,
but if the following isn't available I'd like to suggest it.
If you're happy to let plot() choose its own limits,
then of course plot(x,y) will do it.
If you know what limits you want, then
plot(x,y,xlim=c(x0,x1),ylim(y0,y1)
will do it.
But sometimes one would like to
a) make sure that (e.g.) the y-axis has a
2009 Jul 28
4
How to do poisson distribution test like this?
Dear R-listers,
I want to reperfrom a poisson distribution test that presented in a
recent-published biological research paper (Plant Physiology 2008, vol 148,
pp. 1189-1200). That test is about the occurrence number of a kind of gene
in separate chromosomes.
For instance:
The observed gene number in chromosome A is 36.
The expected gene number in chromosome A is 30.
Then, the authors got a
2008 Oct 20
3
? extended rep()
Hi Folks,
I'm wondering if there's a compact way to achieve the
following. The "dream" is that, by analogy with
rep(c(0,1),times=c(3,4))
# [1] 0 0 0 1 1 1 1
one could write
rep(c(0,1),times=c(3,4,5,6))
which would produce
# [1] 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1
in effect "recycling" x through 'times'.
The objective is to produce a vector of
2010 Sep 08
6
'par mfrow' and not filling horizontally
Greetings, Folks.
I'd appreciate being shown the way out of this one!
I've been round the documentation in ever-drecreasing
circles, and along other paths, without stumbling on
the answer.
The background to the question can be exemplified by
the example (no graphics window open to start with):
set.seed(54321)
X0 <- rnorm(50) ; Y0 <- rnorm(50)
2010 Jul 14
3
Convergent series
What are some reliable R functions that can compute the value of a
convergent series?
David
--
David R. Bickel, PhD
Associate Professor
Ottawa Institute of Systems Biology
Biochem., Micro. and I. Department
Mathematics and Statistics Department
University of Ottawa
451 Smyth Road
Ottawa, Ontario K1H 8M5
http://www.statomics.com
Office Tel: (613) 562-5800 ext. 8670
Office Fax: (613) 562-5185
2009 May 17
2
Output of binary representation
I am interested in studying the binary representation of numerics
(doubles) in R, so am looking for possibilities of output of the
internal binary representations. sprintf() with format "a" or "A"
is halfway there:
sprintf("%A",pi)
# [1] "0X1.921FB54442D18P+1"
but it is in hex.
The following illustrate the sort of thing I want:
1.1001 0010 0001 1111
2016 Jun 10
2
[RFC] LLVM Coroutines
Hi Eli:
>> semantics of the fork intrinsic... thinking about it a bit more, I think
>> you're going to run into problems with trying to keep around a return block
>> through optimizations:
How about this? Make all control flow explicit (duh).
declare i8 coro.suspend([...])
returns:
0 - resume
1 - cleanup
anything else - suspend
Now we can get
2008 Mar 12
1
[follow-up] "Longitudinal" with binary covariates and outcome
Hi again!
Following up my previous posting below (to which no response
as yet), I have located a report which situates this type
of question in a longitudinal modelling context.
http://www4.stat.ncsu.edu/~dzhang2/paper/glm.ps
Generalized Linear Models with Longitudinal Covariates
Daowen Zhang & Xihong Lin
(This work seems to originally date from around 1999).
They consider an outcome Y,
2009 Jun 04
3
Understanding R Hist() Results...
Think I'm missing something to understand what is going on with hist(...)
http://n2.nabble.com/What-is-going-on-with-Histogram-Plots-td3022645.html
For my example I count 7 unique years, however, on the histogram there only 6. It looks like the bin to the left of the tic mark on the x-axis represents the number of entries for that year, i.e. Frequency.
I guess it looks like the bin for
2008 Oct 11
2
R vs SPSS contrasts
Hi Folks,
I'm comparing some output from R with output from SPSS.
The coefficients of the independent variables (which are
all factors, each at 2 levels) are identical.
However, R's Intercept (using default contr.treatment)
differs from SPSS's 'constant'. It seems that the contrasts
were set in SPSS using
/CONTRAST (varname)=Simple(1)
I can get R's Intercept to match
2008 Apr 27
2
Deb-4.0 Etch and sources.list for R
Hi Folks,
I'm running Debian-4.0 Etch, installed last September
from a DVD, and regularly updated as things arise.
I have R version 2.4.0 Patched (2006-11-25 r39997)
installed (initially at the time of first installation
of Debian, as provided by Debian), along with a variety
of packages.
I'd like to be able to connect to the CRAN repositories
for Debian R, for updates etc.
When I visit
2016 Jun 11
4
[RFC] LLVM Coroutines
On Fri, Jun 10, 2016 at 5:25 PM, Gor Nishanov <gornishanov at gmail.com> wrote:
> Hi Eli:
>
> >> Naively, you would expect that it would be legal to hoist the store...
> >> but that breaks your coroutine semantics because the global could be
> mutated
> >> between the first return and the resume.
>
> Hmmm... I don't see the problem. I think
2010 Jun 15
2
Unspecified [upper] xlim/ylim?
Greetings!
I would like to be able to specify a fixed (say) lower limit
for plotting, while leaving the upper limit "floating, when
plotting. The context is that the maximum in the data to be
plotted is unpredictable, being the consequence of a simulation,
whereas I know that it cannot be less than (say) 0; and I want
to fix the lower limit at 0 in any plot, leaving the upper limit
to be