Displaying 20 results from an estimated 3000 matches similar to: "documenting overridden methods (for S4 classes)"
2007 Nov 20
2
adding an image to a plot
Hi, I'm writing code to generate a plot, in which I draw a series of
rectangles. So my code is of the form
plot.new()
plot.window( ... )
draw rectangle
draw rectangle
...
Is there a way for me to insert a PNG or PDF graphic at a specific
position in the plot (ideally in plot coordinates)? I realize that
this might probably be better done in a separate image editor, but if
it could
2004 Apr 19
1
using subscripts in a plot title with 2 lines
Hi,
I'm making a plot in which the title takes up two lines. The title
contains a subscript but when I look at the plot it does'nt seem tocome
out properly. The code I'm using is:
xtxt = expression(paste('Observed -log( ', IC[50], ' )'))
ytxt = expression(paste('Predicted -log( ', IC[50], ' )'))
mtxt = expression(paste('Plot of Observed
2007 Aug 09
1
S4 based package giving strange error at install time, but not at check time
Hi, I have a S4 based package package that was loading fine on R
2.5.0 on both OS X and
Linux. I was checking the package against 2.5.1 and doing R CMD check
does not give any warnings. So I next built the package and installed
it. Though the package installed fine I noticed the following message:
Loading required package: methods
Error in loadNamespace(package, c(which.lib.loc, lib.loc),
2007 Aug 13
4
vertically oriented color key in heatmaps
Hi, I have some data which I was plotting using image(). I wanted to
add a vertical color key to the plot and I found that heatmap.2 in
gplots does let me add a color key. However, I was thinking of a
vertical bar with the color range rather than the style that gplots
provides.
Is there any package (or code snippet) that would let me add a
vertical color key to an image() or heatmap
2006 Aug 18
1
list of lists to a data.frame
Hi, I have a situation where I have a list of lists. Each list can
contain elements of different types (but each one will be a scalar) say
of double, integer or character.
However the elements of each list are always in the same order:
x <- list('a', 1, 2)
y <- list('b', 3, 4)
z <- list('c', 5, 6)
a <- list(x,y,z)
What I'd like to do is to convert a to a
2003 Mar 03
2
saving a plot to a file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm a new user of R and have managed to make a plot of a histogram. Is there
any way I set the title and axes labels and then save the plot as an image
(png/gif)?
Thanks
- --
- -------------------------------------------------------------------
Rajarshi Guha <rajarshi at presidency.com> <http://jijo.cjb.net>
GPG
2003 Sep 14
1
title for plot contain 4 subplots
Hi,
I'm plotting 4 graphs on one page (2x2 matrix) but I cant seem to get
the title for the whole page right.
I'm doing:
op <- par(mfrow = c(2,2), pty="s")
hist(var$V2, breaks="FD",main="Euclidean Metric", xlab="Sum of 3NN ...
hist(var$V2, breaks="FD",main="Manhattan Metric", xlab="Sum of 3NN ...
hist(var$V2,
2003 Sep 15
1
question regarding ks.test()
Hi,
I'm using the ks.test() on two vectors. I looked up the reference and
also coded up a version of the two sample Smirnov test. My question is
that how can I decide from the output of R that the two vectors x & y
come from the same distribution?
Am I correct in assuming that smaller D values indicate that they come
from the same distribution? In addition how can I use the p value that
2003 Sep 03
3
plotting a distribution curves
Hi,
is there a way to plot distribution curves (say normal or chi sq etc)
from within R?
For example I looked up the *chisq family of functions but I'm not sure
as to how I would use them to generate a plot of the chi sq distribution
(for arbitrary d.o.f).
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rajarshi at presidency.com>
2004 Feb 12
2
variances of values predicted using a lm object
Hi,
is there a function in R that will give me the variances of a
predicted values obtained using predict.lm().
If no function is available I would need to calculate them myself -
which involves taking the inverse of X'X (' indicating transpose)
where X is my model matrix. I know that calculating an inverse directly
is not a good idea in general - could anybody suggest a way around
2003 Sep 30
2
subsetting a matrix
Hi,
I'm trying to take a set of rows and columns out of a matrix. I hve
been using the index aray approach. My overll matrix is X and is 179 x
65. I want to take out 4 columns and 161 rows.
Thus I made a 161 x 2 array I and filled it up with the row,col indices.
However doing,
X[ I ] gives me a vector of the extracted elements. Is there anyway I
can coerce this into a 161 x 4 matrix?
2003 Oct 01
1
question about predictions with linear models
Hi,
this question is probably very obvious but I just cant see where I
might be going wrong.
I'm using the lm() function to generate a linear model and then make
predictions using a different set of data.
To generate the model I do (tdata & pdata are matrices of observations
and parameters, tdepv, pdepv are response vectors)
x <- as.data.frame(tdata)
x$tdepv <- tdepv
2003 Dec 03
3
checking for identical columns in a mxn matrix
Hi,
I have a rectangular matrix and I need to check whether any columns
are identical or not. Currently I'm looping over the columns and
checking each column with all the others with identical().
However, as experience has shown me, getting rid of loops is a good idea
:) Would anybody have any suggestions as to how I could do this job more
efficiently.
(It would be nice to know which
2004 May 20
2
column sorting a matrix with indices returned
Hi,
I'm trying to translate some Matlab code to R and I'm trying to
implement the behavior of Matlab's sort() which when applied to a matrix
will sort the columns returning the column sorted matrix as well as a
matrix of permuted indices.
Doing:
> x <- matrix(c(3,4,2,6,3,4,8,7,5), nr=3)
> x
[,1] [,2] [,3]
[1,] 3 6 8
[2,] 4 3 7
[3,] 2 4 5
2005 Mar 24
1
Rggobi package
Hi,
I have an old version of the Rggobi package which now wont load (R
2.0.0). Looking for the package on CRAN does'nt turn up anything and
the links on http://www.ggobi.org/RSggobi.html don't work.
Does anybody know where I can get the latest version of RSggobi or
Rggobi?
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rxg218 at
2005 Sep 21
1
R , Java & DCOM
Hi,
I am working on a Java project that will run primarily on Windows. As
part of the project I would like to use the R engine.
However, from what I have seen on this list & the SJava list, installing
SJava on Windows can be troublesome.
As a result I was wondering if anybody had used DCOM to access R from a
Java program on Windows (if it is all possible).
Any pointers to documents and/or
2003 Nov 10
5
attaching data to any object
Hi,
is the following possible - in a given session I make a lot of objects
and save when exiting. Usually I note down seperately what each object
is about. Is it possible to attach data to any object which would
essentially be a short note explaining the meaning of it?
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rxg218 at psu.edu>
2004 Jun 21
2
visualizing a list of probabilities
Hi,
I'm using nnet to work on a 2 class classification problem. The result
of my code is data.frame of true class, predicted class and associated
probability.
One way of summarizing the data is by a confusion matrix. However are
there any graphical ways I could represent the data - specifically, I'd
like to show the probabilities associated with each member of my
prediction set?
(I
2004 Jan 20
2
graph algorithms in R
Hi,
I was wondering if there are any packages available that can represent
mathematical graphs along with functions to manipulate them? Google
did'nt turn up anything ( I may be asking too much of R :-/ )
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rxg218 at psu.edu> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04
2004 Oct 15
0
SJava 0.65 and R 2.0.0 (slightly long)
Hi,
I had some Java code that worked with SJava 0.65 under R 1.8.*. I'm
trying to get it to work with R 2.0.0. My JVM is Sun 1.5.0 (running on
Fedora Core 2)
I downloaded and installed SJava 0.65 in my personal directory using
R CMD INSTALL SJava-0.65.tar.gz -l ~/src/Rlibrary
and before starting R I sourced RJava.bsh. However after loading the
SJava library if do javaConfig() I get