similar to: Colors in R

Displaying 20 results from an estimated 200 matches similar to: "Colors in R"

2000 Feb 29
0
mapping of colornames into hsv: half way done
Ok, now we have the mapping of color names to color codes (see below) and conversion to rgb (something like Ben Bolker's function), but how to convert rgb to hsv? Thanks to Brian Ripley, Peter Dalgaard and Ben Bolker Details below Regards Jens etc/colors.big maps 455 names to rgb in S syntax etc/rgb.txt maps 657 names to rgb in C syntax, but unlike colors() it has mixed upper and
2010 Oct 11
1
MATLAB vrs. R
I need to find the area under a trapezoid for a research-related project. I was able to find the area under the trapezoid in MATLAB using the code: function [int] = myquadrature(f,a,b) % user-defined quadrature function % integrate data f from x=a to x=b assuming f is equally spaced over the interval % use type % determine number of data points npts = prod(size(f)); nint = npts -1; %number of
2006 Jan 08
1
confint/nls
I have found some "issues" (bugs?) with nls confidence intervals ... some with the relatively new "port" algorithm, others more general (but possibly in the "well, don't do that" category). I have corresponded some with Prof. Ripley about them, but I thought I would just report how far I've gotten in case anyone else has thoughts. (I'm finding the code
2011 Jul 07
2
Multiple line graphs
HI everyone, I'm just starting to get into graphing with R and I need to generate one graph that illustrates the pattern of gene expression for various patients. My data is in .csv format and is as follows and i'm showing below a portion of the data. Pt Coordinate Log2Ratio 1 34046382 -0.023639869 1 34141437 0.016456776 1 34232498 -0.027852121 1 34261900 -0.167065347 2 34364856
2006 Jan 23
1
too-large notches in boxplot (PR #7690)
PR #7690 points out that if the confidence intervals (+/-1.58 IQR/sqrt(n)) in a boxplot with notch=TRUE are larger than the hinges -- which is most likely to happen for small n and asymmetric distributions -- the resulting plot is ugly, e.g.: set.seed(1001) npts <- 5 X <- rnorm(2*npts,rep(3:4,each=npts),sd=1) f <- factor(rep(1:2,each=npts)) boxplot(X~f) boxplot(X~f,notch=TRUE) I can
2006 Oct 09
1
boxplot, notches, etc.
Sorry to repost this, but it looks like it's getting buried in r-help (originally posted October 5: my experience says that if it hasn't been answered by then it won't be). I wouldn't bother, but I'm worried that r-devel might be better, *and* a previous e-mail of mine on the subject in January also seemed to get buried. Synopsis: boxplot notches look weird when notches are
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion: resubmitting it as a bug, just so it gets logged appropriately] Sorry to report further difficulties with nls and profiling and constraints ... the problem this time (which I didn't check for in my last round of testing) is that the nls profiler doesn't seem to respect constraints that have been set when using the port algorithm. See test code
2010 Oct 08
1
Trapezoid Rule
Dear R Users, I've never used R before and my professor has asked us to do some pretty intense programming (or it's intense to me at least). Here is the question: Modify the function myquadrature inside the script so that it returns the quadrature of descrete data using the trapezoidal rule. Modify the call to the function at the bottom of the script so that is uses your modifies
2005 Jan 12
4
Finding seasonal peaks in a time series....
I have a seasonal time series. I want to calculate the annual mean value of the time series at its peak (say the mean of the three values before the peak, the peak, and the three values after the peak). The peak of the time series might change cycle slightly from year to year. # E.g., nPts <- 254 foo <- sin((2 * pi * 1/24) * 1:nPts) foo <- foo + rnorm(nPts, 0, 0.05) bar <- ts(foo,
2006 Jan 17
0
nls profile with port/constraints
Sorry to report further difficulties with nls and profiling and constraints ... the problem this time (which I didn't check for in my last round of testing) is that the nls profiler doesn't seem to respect constraints that have been set when using the port algorithm. See test code below ... If I can I will try to hack the code, but I will probably start by redefining my function with
2012 Feb 13
1
comment lines sometimes removed from a function on exit from internal R editor
Dear All - The problem: comment lines in an R function (lines beginning with # ) are *sometimes* removed on leaving the R default editor (same with notepad). I'm working on a Windows machine with R version 2.14.1. An example is below. Couldn't find anything that seemed to relate to this in the Changelog. I don't recall encountering this behavior with previous versions of R. Any
2007 Oct 01
4
how to plot a graph with different pch
I am trying to plot a graph but the points on the graph should be different symbols and colors. It should represent what is in the legend. I tried using the points command but this does not work. Is there another command in R that would allow me to use different symbols and colors for the points? Thank you kindly. data(mtcars) plot(mtcars$wt,mtcars$mpg,xlab= "Weight(lbs/1000)",
2007 Jun 24
2
matlab/gauss code in R
Hi all! I would like to import a matlab or gauss code to R. Could you help me? Bye, Sebasti?n. 2007/6/23, r-help-request en stat.math.ethz.ch <r-help-request en stat.math.ethz.ch>: > Send R-help mailing list submissions to > r-help en stat.math.ethz.ch > > To subscribe or unsubscribe via the World Wide Web, visit >
2010 Jul 07
0
HELP - four.nines.cartesian.probability.grid
My routine (below) works OK but misbehaves if the on-screen plot is made wider using the mouse. The problem is caused by using par("usr")[1] - 0.07 * (par("usr")[2] - par("usr")[1]) to locate two items on the y-axis. The rest of the labeling is controlled by the "line=0" parameter setting. Of course resizing changes the absolute plot width, and
2012 Sep 07
2
metafor package: study level variation
Hello. A quick question about incorporating variation due to study in the metafor package. I'm working with a particular data set for meta-analysis where some studies have multiple measurements. Others do not. So, let's say the effect I'm looking at is response to two different kinds of drug treatment - let's call their effect sizes T1 and T2. Some studies have multiple
2004 Feb 13
5
predict function
I am using R to do a loess normalisation procedure. In 1.5.1 I used the following commands to normalise the variable "logratio", over a 2d surface (defined by coordinates x and y): > array <- read.table("121203B_QCnew.txt", header=T, sep="\t") > array$logs555<-log(array$s555)/log(2) > array$logs647<-log(array$s647)/log(2) >
2013 Jan 26
2
confidence / prediction ellipse
Hi, I'm using the R library(car) to draw confidence/prediction ellipses in a scatterplot. >From what i understood the ellipse() function return an ellipse based parameters: shape, center, radius . If i read dataEllipse() function i can see how these parameters are calculated for a confidence ellipse. ibrary(car) a=c(12,12,4,5,63,63,23) b=c(13,15,7,10,73,83,43) v <-
2010 May 20
3
lines on plot
Is there an easier way to make this graph *without* having to specify all of the separate segment arguments at the end? > x <- c(1,2) > off <- c(4,5.5) > def <- c(5.5,5.9) > par(fg="lightblue4") > plot(x,off,type="o",col="dodgerblue4",ylim=c(2,7),xlim=c(0.7,2.3),axes=F,xlab="Labor Condition",ylab="Willingness to
2005 Jun 25
2
optimization problem in R ... can this be done?
Im trying to ascertain whether or not the facilities of R are sufficient for solving an optimization problem I've come accross. Because of my limited experience with R, I would greatly appreciate some feedback from more frequent users. The problem can be delineated as such: A utility function, we shall call g is a function of x, n ... g(x,n). g has the properties: n > 0, x lies on the
2001 Feb 28
2
Automating the job?
Hi! I just started to use R recently, and would like to ask a help about automating the job. I need to use "kmeans" function with my own 300 data files, and wonder if it's possible to do it automatically. For example, > library (mva) > mydata <- read.table ("data1") > cl <- kmeans(mydata, 5, 20) and I just need to save "cl" info (i.e. the center