similar to: A primitive OO in R -- where next?

Displaying 20 results from an estimated 30000 matches similar to: "A primitive OO in R -- where next?"

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]]
2008 Jan 28
1
Integer vs numeric
Hi the list. I do not understand the philosophy behind numeric and integer. - 1 is numeric (which I find surprising) - 2 is numeric. - 1:2 is integer. Why is that ? Christophe
2007 Oct 07
1
Arguments to "personalised" plot()
Hi Folks, I'm curious for an explanation of the following -- it's a matter of trying to understand how R parses it. I've written sundry little "helper" variants of functions, in particular plot(), to save repetitively typing the same options over and over again. For example: plotb <- function(x,...){plot(x,pch="+",col="blue",...)} This does exactly
2009 Jul 02
4
(no subject)
Hi Guys, It is very simple question, but I can't find the answer! Please help me. I use R and such simple function as length() doesn't work. The result is always 1 even if my data are more then 1 observations! Do I have to load any additional library? > length(Ret_1) [1] 1 > length function (x) .Primitive("length") Thank you!!! -- Best regards, Andy Fetsun
2010 Jun 17
1
[OT] Oo-calc & StAtistics
The thread "R licensing query" currently running has raised the classic critcisms of using Excel for statistics. I was wondering: Has anyone applied the same or similar set of tests to OpenOffice "calc"? Or would the Executive Summary be: "Calc is just like Excel"? (Not that I'm a spreadsheet user, if I can avoid it; but I sometimes get asked about such
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,
2007 Oct 19
6
r achives
sorry but how do i accsess r archives __________________________________________________ [[alternative HTML version deleted]]
2003 Oct 27
1
Difficulties with R.oo (static fields, etc.)
I would like to use R.oo and tcltk to implement a Turtle World. I have encountered many problems because: 1) I am not sure how to implement static fields with R.oo 2) I am not sure how to implement a constructor that would call a function only for the first instance of a class (i.e., to initialize value of static fields only once) 3) I am not sure how to remove/delete cleanly existing
2008 Dec 03
1
Function output difficulties
is there anyway for some parts of the function output to not be returned, even if the output has been used to calculate a further part of the function? i have tried invisible() to no avail. Thanks Emma -- View this message in context: http://www.nabble.com/Function-output-difficulties-tp20813117p20813117.html Sent from the R help mailing list archive at Nabble.com.
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 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
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 Dec 07
4
increase or decrease variable by 1
many languages have shorthands for that operation like: variable += 1 or ++variable is there something like that in R ? -- View this message in context: http://r.789695.n4.nabble.com/increase-or-decrease-variable-by-1-tp3076390p3076390.html Sent from the R help mailing list archive at Nabble.com.
2003 Feb 13
3
OO programming in R
Dear, I'm looking for some examples on OO programming in R. I have the programming manual with explanation on UseMethod and NextMethod but I miss some practical examples to get me going (I hope). I searched the web but could not find a good independent tutorial on this. Any suggestions are welcome, Kris -- ------------------------------------------------------------------------
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
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
2010 Sep 13
2
How to generate a particular sequence ?
Dear R, I have a vector, say a = c(1,2,4,5,6,8). Can I generate a vector or array (2-by-3-by-3) of this form c(1,2,1,2,1,2,4,5,4,5,4,5,6,8,6,8,6,8), in which every two elements in "a" have been repeated twice? I am to stupid today and could not figure this simple question out... Many many thanks! Feng -- Feng Li Department of Statistics Stockholm University 106 91 Stockholm,
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
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