Displaying 20 results from an estimated 10000 matches similar to: "Working with a set of matrices"
2008 Jul 11
1
Subsetting an array by a vector of dimensions
Hi
Is it possible to subset an n-dimensional array by a vector of n dimensions? E.g. assume I have
> x <- array(1:24, dim=2:4)
> x[1,1,2]
[1] 7
> dims <- c(1,1,2)
I would like a function that I can supply x and dims as parameters to, and have it return 7. Also, I would like to do something like:
> x[1,1,]
[1] 1 7 13 19
> dims2<- c(1,1,NA)
And have a function of x and
2007 Mar 06
2
SVG and tooltips, hyperlinks
Dear all,
is there a good way to create SVG plots with R whose elements have
titles (tooltips) or act as hyperlinks?
I am using the RSvgDevice package, which works great - but it doesn't
seem to support the notion that plot objects have titles or are act as
hyperlinks, so I am helping myself by giving the objects funny unique
colors and then postprocessing the .svg file.
I wonder
2010 Jan 16
1
"Too many raster images" in devPS.c
Hi,
I am finding the recently added [1] functionality of embedding raster
images into plots on R devices very useful! Thanks to Paul Murrell and
others for providing that. I noted that in
https://svn.r-project.org/R/trunk/src/library/grDevices/src/devPS.c
a macro is defined: #define MAX_RASTERS 64, and consequently, I get
Error in grid.Call.graphics("L_raster", x$raster, x$x, x$y,
2009 Feb 25
1
Unexpected side effect of the ":::" operator on the value of isGeneric
Hi,
when running the following on a fresh R,
library("IRanges")
annotation
showMethods("annotation")
Biobase:::annotation
showMethods("annotation")
I get (see the "^^^^^" marked output at the bottom):
> library("IRanges")
Carico il pacchetto richiesto: 'IRanges'
The following object(s) are masked from package:base :
2008 Jul 15
5
counting number of "G" in "TCGGGGGACAATCGGTAACCCGTCT"
Any better solution than this ?
sum(strsplit("TCGGGGGACAATCGGTAACCCGTCT", "")[[1]] == "G")
_________________________________________________________________
[[alternative HTML version deleted]]
2007 Mar 19
1
Carriage returns and Sweave output
Dear all,
I have a code chunk in my Rnw file that, when executed, outputs
carriage return characters ('\r') to inform on the progress (e.g.
"sweep 4 of 1024\r"). But Sweave interprets this as a newline
character, and therefore I get countless pages of output in my
vignette where I only really want one line. Any ideas?
Thanks
E
2007 Jan 19
1
Error in heatmap()
Hi,
I run into following error when using heatmap() for data matrix "xx".
Any help is appreciated? "xx" contains many "NA"s.
> hv <- heatmap(data.matrix(xx))
Error in hclustfun(distfun(if (symm) x else t(x))) :
NA/NaN/Inf in foreign function call (arg 11)
Thanks a lot.
Yuhong
2008 Jul 14
1
Analysis of poorly replicated array data
Greetings,
I have "inherited" a cDNA macroarray dataset that is structured as follows.
Three different stressors were tested. For each stressor, there are two
treatments (control and stressed). For each treatment, two biological
replicates exist, and these are paired (i.e., there is a stressed array for
colony A and a control array from this same colony). For one of these
samples,
2018 Sep 20
3
A different error in sample()
Good day,
The use of "rounding" also doesn't make sense. If The number is halfway between two integers, it is rounded to the nearest even integer.
> round(2.5)
[1] 2
--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia
2008 Jul 14
2
question about a small "for" loop
R 2.5.1 on WinXP
I'm trying to create new variables in a dataframe called jaw, as powers
of jaw$age up to the sixth power, and name them
jaw$age.(--the digit corresponding to the power--)
Obviously none of these work (silly for me to try, I suppose):
for (i in 2:6) {
jaw$age.'i' <- jaw$age^i
}
for (i in 2:6) {
jaw$age.i <- jaw$age^i
}
for (i in 2:6) {
2008 Aug 05
2
Adding .PDF files to a package
Deal all,
new as I am to developing packages for R-Project, I apologize on
beforehand for questions that are too obvious. I am trying to 'add' a
PDF document containing some detailed information to a package.
The way I understand the Rexts.pdf document, I should add my .PDF
document to the /inst/doc/ folder, and links to the files should be
build automatically. However, after
2007 Jan 19
2
combn implementation
Hi,
I was checking the source code to the function combn that "generates
all combinations of the elements of 'x' taken 'm' at a time.",
because I wished to modify it. I have a doubt about a statement.
This is the main loop.
._1 <- 1:1
nmmp1 <- n - m + ._1
while (a[1] != nmmp1) {
if (e < n - h) {
h <- ._1
e <-
2008 Jun 07
1
strange (to me) p-value distribution
I'm working with a genomic data-set with ~31k end-points and have
performed an F-test across 5 groups for each end-point. The QA
measurments on the individual micro-arrays all look good. One of the
first things I do in my work-flow is take a look at the p-valued
distribution. it is my understanding that, if the findings are due to
chance alone, the p-value distribution should be uniform. In
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all,
Since my package is based on S4 classes, I would like to know how to add
a slot to an existing S4 class without breaking the code of users of my
package.
Assume the following S4 class:
setClass("MyClass",
representation(name = "character",
type = "character",
data = "data.frame"
),
prototype(name =
2016 Apr 11
2
R not responding (must force quit) when saving graphic to PDF (bug?)
Dear colleagues,
I wish to report a problem I encounter when trying to save a graphic to
file. When I produce a graphic and try to save it R becomes unresponsive
and I must force quit, and then restart R. The problem occurs when I try to
overwrite an existing graphic: for example when I made changes to the
graphic and want to save the graphic using the original file name. It only
happens when I
2010 Oct 13
2
Scripting SVG with R
Since now many browsers support (ECMA/Java-)scripted SVG, I am wondering
whether there are already any examples of inserting R code into SVG
documents (or a Javascript canvas?) either directly, or perhaps more
likely through a JavaScript layer, to dynamically generate graphics or
make them interactive?
I am aware of the excellent packages gridSVG and SVGAnnotation, which
facilitate making
2008 Feb 09
2
shortest distance between two point pattern
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080208/bf7b4696/attachment.pl
2009 Dec 28
2
[BioC] make.cdf.package: Error: cannot allocate vector of size 1 Kb
My machine has 8GB memory. I had quit all other programs that might
take a lot of memory when I try the script (before I post the first
message in this thread). The cdf file is of only 741 MB. It is strange
to me to see the error.
On Mon, Dec 28, 2009 at 2:38 AM, Wolfgang Huber <whuber at embl.de> wrote:
> Dear Peng Yu
>
> how big is the RAM of your computer? You could try with
2016 Apr 11
1
R not responding (must force quit) when saving graphic to PDF (bug?)
Dear Wolfgang,
Thanks for your response.
No, I haven't tried doing the complete reinstallation as you suggest. If I
recall correctly, this has happened on previous occasions but like I said
in my email it's not all that disruptive to my workflow. It's more like a
'first world problem'.
I was encouraged to submit the query because I had correspondence with
someone involved
2007 Mar 19
2
sorting with criteria that are "out of order"
I try to sort this dataframe:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] "CM" "BARBY" "INCREASED" " 0" " 2" " 0" " 1" " 1"
[2,] "CM" "BARBY" "REDUCED" " 0" " 1" " 2" " 2" " 5"
[3,] "CM"