Displaying 20 results from an estimated 20000 matches similar to: "indexing by character with identical names"
2005 Jun 22
3
string/character to number
I did a very quick search of the archive and couldn't find a readily
available answer to this one:
I'd like to convert, for example:
c("a", "b", "a", "b")
to
c(1, -1, 1, -1)
In the case of the first vector, it may be any length, but will always
only have two unique values. It must always be replaced by
corresponding values of 1 and -1.
Any
2008 Apr 28
2
call function immediately before plot.new()
Hi all,
I would like to be able to call a custom function automatically before
plot.new() is called (more specifically, before a new plot is created on the
current graphics device). Recently I've been poking around in the help
files of some of the low(er) level plotting functions, and I seem to
remember something saying that you could somehow add a setting to call a
function immediately
2005 Aug 03
3
red-black-green color palette?
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to create one?
Thanks,
Jake
2005 Aug 03
5
make error: X11/Intrinsic.h: No such,,,
Hi all,
I'm trying to build R 2.1.1 on Ubuntu 5.04 i686-SMP. Configure goes well
with:
./configure --with-BLAS --with-readline=no
but once I run 'make', I get the following error:
In file included from devX11.c:64:
devX11.h:57:74: X11/Intrinsic.h: No such file or directory
Any ideas?
Thanks in advance,
Jake
2005 Jul 21
3
heatmap color distribution
Hi all,
I've got a set of gene expression data, and I'm plotting several
heatmaps for subsets of the whole set. I'd like the heatmaps to have
the same color distribution, so that comparisons may be made
(roughly) across heatmaps; this would require that the color
distribution and distance functions be based on the entire dataset,
rather than on individual subsets. Does
2005 Apr 25
2
residuals in lmer
Does anyone know how to extract residuals in lmer?
Here's the error I get:
>
crop.lme=lmer(response~variety*irrigation*pesticide+(1|rep)+(1|rep:
pesticide)+(1|rep:pesticide:irrigation), crop.data)
> qqnorm(crop.lme)
Error in qqnorm.default(crop.lme) : y is empty or has only NAs
> resid(crop.lme)
NULL
Thanks!
--Jake
2005 Jun 16
2
heatmap aspect ratio
Hi all,
Does anyone know of a fairly easy way to "stretch" a heatmap
vertically? I've got 42 arrays and would like to be able to see as
many significant genes as possible (right now I can only get 50 genes
with it still being readable). In some comparisons there are several
hundred significant genes.
I've fiddled with the "asp" argument, but that doesn't
2005 Nov 11
1
conditional coloring of image labels
Hi all,
I am interested in plotting a heatmap of a set of genes. I would like the
text labels of these genes to be colored red rather than black if they meet
certain statistical criteria (using an if statement). I'm not sure how to
change individual color labels without changing them all. Can anyone provide
some insight on how to do this?
Thanks in advance,
Jake
2005 Aug 02
1
(no subject)
I've been using R for a while under Mac OS X, which thanks to the R
on OS X developers, is probably the best platform for learning R. I
recently built a Linux box with a Pentium D processor, and am running
an AMD64 port of Ubuntu with the SMP kernel.
After setting up the basics on the box, I thought I'd install R as
well. I've had a very hard time finding good documentation
2005 Aug 02
1
(no subject)
I've been using R for a while under Mac OS X, which thanks to the R
on OS X developers, is probably the best platform for learning R. I
recently built a Linux box with a Pentium D processor, and am running
an AMD64 port of Ubuntu with the SMP kernel.
After setting up the basics on the box, I thought I'd install R as
well. I've had a very hard time finding good documentation
2005 Nov 29
1
help combining mtext and strwrap?
Hi all,
I've got some image plots on which I'd like to include some gene information
(in the margins using mtext). Unfortunately, the description is rather long
and will need to be wrapped to fit on several lines. From what I know about
mtext, it's really only meant for single-line labels, not paragraphs.
Here's some sample code of the idea I'm trying to accomplish:
2007 Aug 02
2
lasso/lars error
I'm having the exact problem outlined in a previous post from 2005 -
unfortunately the post was never answered:
http://tolstoy.newcastle.edu.au/R/help/05/10/15055.html
When running:
lm2=lars(x2,y,type="lasso",use.Gram=F)
I get an error:
Error in if (zmin < gamhat) { : missing value where TRUE/FALSE needed
...when running lasso via lars() on a 67x3795 set of predictors. I
2001 Oct 09
3
Unlisting while preserving object types?
Hi
A toy example is probably the least ambiguous way of explaining what I'm
trying to do.
> library(ts)
> zz<-list(a=rnorm(100),b=rt(100,3))
> zz.spec<-lapply(zz,spectrum,plot=F)
> summary(zz.spec)
Length Class Mode
a 15 spec list
b 15 spec list
I'm looking for an elegant way to fetch components of the sub-lists a and b
of zz.spec;
e.g. to make a matrix
2018 Jul 24
4
Library lib.loc Option Ignored for Dependencies
>>>>> Benjamin Tyner
>>>>> on Sat, 21 Jul 2018 13:42:43 -0400 writes:
> Not sure whether it is the same issue as was raised here:
> https://stat.ethz.ch/pipermail/r-devel/2010-October/058729.html
> but in any case perhaps the problem could partially be remedied on line
> 245 of src/library/base/R/library.R by passing the lib.loc to
2010 Nov 03
3
Using sample() to sample one value from a single value?
Hi, consider this one as an FYI, or a seed for further discussion.
I am aware that many traps on sample() have been reported over the
years. I know that these are also documents in help("sample"). Still
I got bitten by this while writing
sample(units, size=length(units));
where 'units' is an index (positive integer) vector. It works in all
cases as expected (=I expect)
2006 Mar 06
13
Internal Server Error - I want to cry
I got a brand new Fedora Core 4 box and was all excited to get Rails
running on it. That was about two days ago. I did all the ''yum install
ruby, etc. etc. etc.'', then ''gem install rails, etc. etc. etc''. I''ve
tried running Rails with httpd (fastcgi and cgi), lighttpd (scgi,
fastcgi, cgi), mongrel, webrick, and even ''ruby
2004 Sep 06
4
Cox regression for prevalence estimates
Hello, I'm an MD working in an eye clinic. I'm learning by myself to use R
for use in my research works and for implementation in a software project.
There are some authors who recomends the use of Cox regression as a
substitute for Logistic regression (<a
href="http://www.biomedcentral.com/1471-2288/3/21.pdf"> Barros AJD, Hirakata
VN. BMCMedical Research Methodology, 2003;
2018 Jul 21
3
Library lib.loc Option Ignored for Dependencies
>>>>> Benjamin Tyner
>>>>> on Fri, 20 Jul 2018 19:42:09 -0400 writes:
> Here's a trick/workaround; if lib.loc is the path to your
> library, then prior to calling library(),
>> environment(.libPaths)$.lib.loc <- lib.loc
Well, that is quite a "trick" -- and potentially a pretty
dangerous one, not intended when making
2004 Apr 20
2
Indexing by factor misfeature
Yesterday I was biten by a feature, which I find too dangerous.
I wanted to use a factor `Subject?? as index into a data frame, whose row
names were the levels of this factor. So there a 2 different possible
interpretations of this: Either Subject is coerced to numeric or to
character. The intended interpretation was, of course, `as.character(Subject)'.
R did `as.numeric(Subject)??. This will
2005 Apr 24
1
random interactions in lme
Hi All,
I'm taking an Experimental Design course this semester, and have spent
many long hours trying to coax the professor's SAS examples into
something that will work in R (I'd prefer that the things I learn not
be tied to a license). It's been a long semester in that regard.
One thing that has really frustrated me is that lme has an extremely
counterintuitive way for