Displaying 20 results from an estimated 10000 matches similar to: "how about a "<p-" operator?"
2010 Aug 25
4
OT: R for iPhone/iPad OS?
No, seriously:  I've had more than one person at work wonder what math 
toolset could be loaded onto iOS.   So, before Matlab, FreeMat, 
Mathematia, SciLab, Octave, or numpy (:-) ) produces a version for iPad, 
any chance someone is working on R for iPad?
2012 Apr 03
2
Looking for the name of a certain kind of quantile plot
Hi,
While playing with quantile-quantile plots, I wrote up some code which 
plots something strangely different.  Here's the pseudocode:
testhist <- hist(sample_data)
refhist <- hist(rnorm(n, mean=0,sd=1))  # for some large-ish n
cumtest <- cumsum(testhist)
cumref <- cumsum(refhist)
plot(cumref,cumtest)
This produces a straight line of slope 1 for a sample with the same 
2011 Oct 31
1
Question about copying reference objects using the initialize method
Dears,
I have a question about copying reference objects using the initialize method.
1) If the latter has no arguments, there is no problem to copy an object.
myClass = setRefClass("myClass", fields = list(value = "numeric") )
myClass$methods(initialize = function(...){
? value <<- 1
? callSuper(...)
})
newObject = myClass$new()
newObject$value = 2
copyObject =
2009 Nov 29
4
lm() notation question
Hi,
A recent thread provided a (working) construct for lm:
lm(as.matrix(freeny[ix]) ~., freeny[-ix])
Can someone explain what is meant by the formula in that expression,
that is,  what does "mymatrix~."  do?  I couldn't find any such example 
in the lm() or formula() help pages.
thanks
Carl
2010 Nov 22
2
Check for is.object
Hello,
I am trying to recursively append some data from multiple files into a
common object
For this, I am using in a loop
NewObject <- rbind(NewObject,tempObject)
For the first loop, obviously there is no NewObject ... so I wanted to do
NewObject <- tempObject[0,]
Now when it loops again I want to put the statement do "NewObject <-
tempObject[0,]" inside a if statement
2008 Nov 01
2
Hidden line algorithms and a different kind of waterfall
This is not the same as the recent thread on a waterfall graph.
I'm thinking about the rolling FFT display used in acoustics and other 
spectrum analysis tasks.
Here's an example of a very fancy 3-D waterfall display:
http://www.ultimaserial.com/UltimaWaterfall.html
I was just wondering if there are any simple hidden-line tools in R that 
I could use to draw simple waterfall displays. 
2009 Jun 18
3
How to parse and eval a collection of items
Let's say I have, for some reason, a bunch of scalars (i.e. 
single-valued variables) and I want to merge them all into a single 
vector of values.  Can someone recommend a better function, or simpler 
way, to do so than the following?
Suppose my scalars' names are foo1, foo2, foo3, foo1high, foo2high, 
foo3lo2, etc.  Then I can do:
 >ls(pat='foo')->thels
2011 Feb 01
1
Help need to define method of an s4 class
I need some help in defining a "print" method for my new S4 class
definition. So fer I have worked like this:
setClass("MyClass", sealed=F, representation(slot1 = "list",    #create a
new class
            slot2        = "vector",
            slot3      = "vector",
            slot4   = "vector"))
setMethod("print",
2008 Oct 14
2
list syntax question: which subscript is which
Hi,
Sorry to bother with something that should be simple, but I can't find it.
Suppose I have a list, each element of which is a 2xN dataframe, where N 
could be different for each element.
Is there some simple structure to let me examine all the elements of 
each element's first column?  For example:
 >foo
$first
      [,1] [,2]
[1,]    1    4
[2,]    2    5
[3,]    3    6
$second
 
2011 May 26
3
change function scope?
I'm still getting used to R's scoping. I've run into the following situation
value=0
thefunction <- function() print( value )
somefunction <- function() { value=99; thefunction() }
somefunction()
now, I understand that somefunction() returns 0 because thefunction() was
defined with value=0 in its parent envrionment, it dosent look at all in the
environment of somefunction. My
2011 Dec 13
2
axis tick colors: only one value allowed?
Hi,
So far as I can tell, the 'col.ticks' parameter for axis() only uses the 
first value provided.  E.g.:
  plot(0:1,0:1, col.ticks=c('blue','red','green'))  #all ticks are blue
Just wondering if there's a different option in the basic plot commands 
that can handle multiple colors, and also whether ggplot and/or lattice 
allow for multiple tick colors.
2008 Jun 07
3
favorite useful tools?
Hi,
I'm relatively new to R, so I don't know the full list of base (or 
popular add-on packages)  functions and tools available.  For example, I 
tripped across mention of rle() in a message about some other problem. 
rle() turned out to be a handy shortcut to splitting some of my data by 
magnitude (vaguely like a sequence-based histogram).
So I thought I'd ask: what small, or
2011 Feb 02
4
testing randomness of random number generators with student t-test?
Hi, subject more or less says it all.
I freely admit to not having bothered to find some of the online papers 
about method of testing the quality of random number generators -- but 
in an idle moment I wondered what to expect from something like the 
following:
randa<-runif(1000)
randb<-runif(1000)
t.test(randa,randb)$p.value
var.test(randa,randb)$p.value
[repeat ad nauseum]
Is the
2011 Aug 15
2
what can one do with (to) '..." ?
I followed a couple threads from the archives and from 
stackoverflow.com, and would like to know: just what is "..."  ?  What I 
mean by this is,for example, from the point of view of a user running a 
function in debug mode,  is "..." an object, or does it exist in the 
current environment as some thingy?
Maybe a better question to ask is: if I were to write some function
2009 Feb 08
3
general inverse solver?
Just wondering if there's an R package which does tricks similar to what 
TK!Solver does.
TK!Solver, for those not lucky enough to have found it, basically allows 
one to define a bunch of equations, assign values to an arbitrary subset 
of the variables, from which it calculates (either directly when 
possible or back-solving when not) the values of the other variable(s).
thanks
Carl
2011 May 02
2
easy way to do a 2-D fit to an array of data?
Hi,
I've got a matrix, Z, of values representing (as it happens) optical 
power at each pixel location.  Since I know in advance I've got a 
single,  convex peak, I would like to do a 2D parabolic fit of the form 
Z = poly((x+y),2) where x and y are the x,y coordinates of each pixel 
(or equivalently, the row, column numbers).
Is there an R function that lets me easily implement that?
2011 May 07
2
write.table vs. read.table and the argument "fill"
Just wondering how come read.table lets you specify fill=TRUE for ragged 
arrays, but so far as I can tell, no equivalent for write.table?
Not a big deal, since I'm perfectly comfortable w/ write and scan and 
the other file I/O goodies.  "A foolish inconsistency..."  and all that.
Carl
2010 Nov 07
2
stupid R tricks
Hi all,
Just thought I'd post this (maybe) helpful tool I wrote.  For people 
like me who are bad at keeping a clean environment, it's a time-saver.
#simple command to get only one type of object in current environment
lstype<-function(type='closure'){
	inlist<-ls(.GlobalEnv)
	if (type=='function') type <-'closure'
2009 Oct 15
2
how to install JGR manually?
Here's the problem: on Windows, the 'jgr.exe' tool starts up by checking 
  for a connecting to the 'net in order to grab the support packages. 
Well,  we have machines at work that are not and never will be connected 
to the Internet.   I tried manually installing all the packages (JGR, 
Rjava,  etc) but the jgr.exe still tries to find a connection.
Is there any way around this?
2008 Jul 13
2
any way to set defaults for par?
I know how to set graphic parameters by calling par(), but what I'd like 
is a way to set the default values so that subsequent calls to par() use 
my defaults.  The reason to want this is that every time I create a new 
graphic window (I'm using quartz on OSX, and so far no answers in the 
Mac mailing list), my parameters get reset to the builtin defaults.
I read about the