Displaying 20 results from an estimated 300 matches similar to: "RGL v0.65"
2008 May 09
2
which.max2()
Hello,
which.max() only returns one index value, the one for the
maximum value. If I want the two index values for the two
largest values, is this a decent solution, or is there a
nicer/better R'ish way?
max2 <-function(v)
{
m=which.max(v)
v[m] = -v[m]
m2=which.max(v)
result=c(m, m2)
result
}
Seems to work ok.
Thanks,
Esmail
2008 Mar 01
1
How to chain user mouse handlers in rgl
Dear Rglers,
With rgl, I would like to set marker when a button is pressed, but leave the
standard trackball handling otherwise. Thanks to Duncan and Oleg for helping
me handling key down.
How do I say in a custom mouse handler "after having done your work, forward
to standard trackball once only"? The example below shows the idea, but it
works only once, then reverts to standard
2007 Nov 14
1
Newbie question about data preparation
I'm new to the R language and still struggling with compactness of R. I
haven't got the right compass into the Documentation, too. So, please
apologize the possibly stupidiy of my question.
I have the following problem:
I have two data sets combined in a data.frame
x y
1.3 2.2
2.5 3.4
3.1 3.7
8.2 9.5
7.5 8.3
For the analyses of the data I want to group one column (like the
classes in a
2011 Oct 11
1
apply for each value
Hello,
There has to be a more R'ish way to do this. I have two matrices, one has
the values I want, but I want to NA some of them. The other matrix has
binary values that tell me if I want to NA the values in the other matrix. I
produce a third matrix based on this. I've also tried apply() passing in
c(1,2) for rows and columns with no success yet.
Example (this works, but I'm
2005 Jan 24
1
lookups and joins
I have some data coming from SQL sources that I wish to relate in various ways. For reasons only known to our IT people, this can't be done in SQL at present.
I am looking for an R'ish technique for looking up new columns on a data frame. As a simple, hardwired example I have tried the following:
# This gives me two columns, one the lookup value and the second one
# the result column,
2010 May 13
1
[LLVMdev] Attention: About to Break SystemZ and possibly other Back Ends
Hi,
Attached is a patch I'm testing. It changes how "MachineFrameInfo::HasCalls" is calculated. Basically, the way it's calculated now is in PEI. And it only looks for frame adjustments (or inline ASM) to determine if the function has a call or not. This way is much more accurate and occurs much sooner. But it breaks this test:
2011 Aug 05
2
[?]apply functions or for loop
Hello,
First time posting to this mail list.
I'd like to use R in the most efficient way. I'm accomplishing what I want,
but feel there is a more R'ish way to do it. Just learning R.
*My goal: get ranks of value across rows with row names and column names
intact.*
I'm guessing one of the [?]apply functions will do what I need, but I
couldn't sort out which one (after a lot
2012 Jul 10
1
RGL 3D curvilinear shapes
Dear useRs,
I'm trying to simply fill in the area under a curve using RGL. Here' the set
up:
x <- c(0.75,75.75,150.75,225.75,300.75,375.75,450.75,525.75,600.75,675.75,
0.5,50.5,100.5,150.5,200.5,250.5,300.5,350.5,400.5,450.5,
0.25,25.25,50.25,75.25,100.25,125.25,150.25,175.25,200.25,225.25)
y <- c(0.05,4.91,9.78,14.64,19.51,24.38,29.24,34.11,38.97,43.84,
2011 Jan 31
0
Esféricas 3D (Alberto Soria)
Hola,
Echale un ojo al paquete ggplot2:
http://had.co.nz/ggplot2/coord_polar.html
Puedes tambien convertir a Cartesianas:
Polar2Cartesian = function(t1, rP){
x1 = rP*cos(t1)
y1 = rP*sin(t1)
return(c(x = x1,y = y1))
}
y trabajar desde ahí con el paquete rgl:
http://rgl.neoscientists.org/gallery.shtml
Un saludo
Eduardo San Miguel Martin
Consultor BI
[[alternative HTML version
2012 Mar 02
0
plotting standard deviation of multivariate normal distribution (preferred in rgl package)
Dear R colleagues,
for a statistics tutorial I want to develop a nice 3d-graphic of the
well known target comparison/analogy of accuracy and precision (see i.e.
http://en.wikipedia.org/wiki/Accuracy_and_precision for a simple hand
made 2d graphic).
The code for a really beautiful graphic is already provided as
demo(bivar) in the rgl package (for a picture see i.e
2011 Apr 25
1
Defining origin for rotation in RGL device
Hi all,
How can I tell RGL to set the center for the rotation to the origin of the coordinate system (0,0,0).
It seems that the default is to use the center of the display not the origin of the coordinate system.
open3d()
lines3d(c(0, 1), c(0,0), c(0,0))
lines3d(c(0,0), c(0, 1), c(0,0))
lines3d(c(0,0), c(0,0), c(0, 1))
TIA
Mark
???????????????????????????????????????
Mark Heckmann
Blog:
2000 Jul 28
2
Loop removal?
Dear all,
I've got a quite large dataframe (stor) with rows subject and rt (reaction
time). I would like to split the reaction times per subject into 6 bins of
equal size. Right now, I'm using the following code:
bindata <- function(rt) {
bindata <- rep(-1,length(rt))
binwidth <- length(rt)/6
bindata[order(rt)[(0*binwidth)+1:(1*binwidth)]] <- 1
2005 Jun 04
3
How to change the value of a class slot
I defined an S4 class with a slot i. Then I wrote a regular function
that attempted to increment i.
This didn't work, apparently because of the general rule that a function
can't change the values of its arguments outside the function. I gather
there are ways around it, but the Green book admonishes "cheating on the
S evaluation model is to be avoided" (p. 190).
Thinking that
2006 May 18
1
Recommended style with calculator and persistent data
I have some calculations that require persistent state. For example,
they retain most of the data across calls with different parameters.
They retain parameters across calls with different subsets of the cases
(this is for distributed computation). They retain early analysis of
the problem to speed later computations.
I've created an S4 object, and the stylized code looks like this
calc
2009 Aug 13
1
joining two points in rgl
Hi!!
I need to draw a cylinder/tube joining two points. I am trying to make something presentable, I have been able to do it using lines3d. But is it possible to
increase the thickness of the lines? The size parameter does not work. Does any one have any suggestions?
Thanks ../Murli
library(rgl)
pts<-structure(list(x = c(-0.975688, -0.975688), y = c(9.258795, -9.258795
), z = c(-1.8, 1.8)),
2007 Mar 02
5
extracting rows from a data frame by looping over the row names: performance issues
Hi,
I have a big data frame:
> mat <- matrix(rep(paste(letters, collapse=""), 5*300000), ncol=5)
> dat <- as.data.frame(mat)
and I need to do some computation on each row. Currently I'm doing this:
> for (key in row.names(dat)) { row <- dat[key, ]; ... do some computation on row... }
which could probably considered a very natural (and R'ish) way of
2007 May 29
1
rgl.postscript
Hi,
I am having an issue when creating a postscript file from RGL window. It
seems to cut off some of the axis labels. Here is the code I am using.
I created a 3D plot using RGL_0.71 with R 2.5 on Windows XP.
z1<-c(5,4,1,4.5,2,3,2,1,1)
z2<-c(6,8,7,7.5,5,3.5,4,1,1)
z3<-c(3,2,4,7,3,4.5,6,2,3)
x1<-seq(1,9)
x2<-seq(1,9)
x3<-seq(10,18)
y1<-seq(8,0)
y2<--1*y1
2005 Jul 16
2
Logitech Marble Mouse on CentOS 4
Hello there!
I just bought this trackball and connected it to a CentOS 4 box. I
googled on how to edit xorg.conf for the 2 scrollbuttons, and they
work while using this section:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option
2008 Feb 01
2
wxruby2 problems
Hello,
I''ve recently installed wxruby2 (version 1.9.4) from a precompiled
mswin32 gem. It seems to work fine, and the samples in the
distribution all work, but I have a couple of peculiar problems:
1) When I package a trivial wxruby script with rubyscript2exe, the
executable is huge - 8.5 MB. With previous versions of wxruby (prior
to wxruby2, I think) it was much smaller. Less than 3
2010 Apr 15
1
(semi-) rugged laptop running CentOS 5?
We're looking for a laptop to run in a 10,000', cold, occasionally wet
environment, and it needs to run CentOS 5. Perhaps something like the
Dell Latitude E6400 ATG? There's a reference to a minor trackball bug
for the 6400 under CentOS 5 (http://bugs.centos.org/view.php?id=4192)
but otherwise it sounds like the x86_64 version should run on it.
Ideally the system would use a SSD too.