similar to: How to plot a normal distribution curve and a shaded tail with alpha?

Displaying 20 results from an estimated 2000 matches similar to: "How to plot a normal distribution curve and a shaded tail with alpha?"

2010 Aug 10
6
How to invert a list ?
Dear list, I have a list, as follows : a <- 5 names(a) <- "a" b <- 9 names(b) <- "b" c <- 15 names(c) <- "c" x <- list("i" = a, "j" = b, "j" = c) I want to invert the list, like this : $a i 5 $b j k 9 15 I do not find a clean solution. Could anyone give me elegant ideas ? Thanks in advance, Carlos
2010 Aug 09
3
Regular Expression
Hi all, >From a list of strings, I desire to filter out the followings: 1. Digits at the beginning of the strings 2. Character "SPE" following the digits (if it exists) 3. Any characters followed by hyphen The following produces the desired result, but would like to know whether this can be done more efficiently. Any suggestions would be much appreciated. dat <- c("2148
2010 Aug 16
4
print numbers
Hi, When I plot, the axis ticks are printed as "50.00 25.00 10.00 1.00 0.05 0.01", is there any way to print them as "50 25 10 1 0.05 0.01" instead? Thanks John
2010 Jul 12
1
problem with comparisons for vectors
I don't know the real reason, but help("==") gives some clues. For numerical and complex values, remember == and != do not allow for the finite representation of fractions, nor for rounding error. Using all.equal with identical is almost always preferable. See the examples. x1 <- 0.5 - 0.3 x2 <- 0.3 - 0.1 x1 == x2 # FALSE on most machines
2010 Jun 03
5
string handling
I have a data.frame as the following: var1 var2 9G/G09 abd89C/T90 10A/T9 32C/C 90G/G A/A . . . . . . 10T/C 00G/G90 What I want is to get the letters which are on the left and right of '/'. for example, for "9G/G09", I only want "G", "G", and for "abd89C/T90", I only want "C" and
2010 Aug 02
1
Convert an expression to a function
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <-
2010 Jul 14
3
How to see inside of this function?
Hi, there is a function Skewness() under fBasics package. If I type "skewness", I get followings: > skewness function (x, ...) { UseMethod("skewness") } <environment: namespace:timeDate> Would be great if someone tell me how to see the codes of this function. 2ndly suppose I create following function: fn1 <- function(x) return(x+2) How
2010 Jul 31
3
a problem
dear: when I read a Excel file(exp-11),The R project give me a error ,Just like this: ??'datafile' > write.foreign("exp-11.xls") ???list(df = df, datafile = datafile, codefile = codefile) : ??'datafile' > write.foreign("exp-11.xls") ???list(df = df, datafile = datafile, codefile = codefile) : ??'datafile' >
2010 May 22
3
Increasing the maximum number of rows
Dear R helpers, I created a somewhat big database (+206,700 rows) in MySQL and have exported into a csv file, but I can't open the whole thing in R. I am using: > base<-read.csv("/path/to/file.csv", header=F, sep="," nrows=206720) R doesn't complain but it only opens 128,328 observations (the number of columns corresponds to the original database): >
2013 Mar 17
1
zero line
Hi all, I´m plotting cf (with two axis) and addind a shaded color up and down on the 0 line x axis (tfr1 is the time). The thing is that when I plot this graph adds a line up on the "first" plot. I hope you can understand what I mean. How should I erase this sencond line, it is suposed they have the same data? Why zero line doesn´t complete the shaded area?
2010 Aug 05
2
try-error within for loop
Dear all, I run a loop wrapped in try(), and for each of the rows where "try-error" is true I want to fill that row with NA (at the moment it is omitted). So I would expect to get a dataframe with 1000 rows some of which would be empty, but instead I get a dataframe with 995 rows. In this case missing 5 rows were omitted. Any suggestions? Thanks, Olga ----------------
2010 Aug 06
2
How to read a file inside a function?
Hi I wish to read a file from my local directory from inside a function. I am passing the filename as the argument but this does not work. Say for example function(dat) { dat1=read.csv("D:\\dat.csv",header=TRUE) } If I call funtion(dat) I get the following error. 'Intuitively' i understand this is a mistake but how do I overcome this and how can I read a file name passed as an
2006 Oct 26
1
Adding shading to background of Time series plot
Hello All, Thank you in advance. I have looked up and down in the archives to see if I could find some help on moving the polygons to the background of a ts.plot. I've tried panel.first in the gpars(...) arguments and trellis.focus, but I get errors. Am I missing something easy here? Here is my script: ts.plot(tsdjia, tstenyield, gpars = list(xlab = " ", ylab = " ",
2010 Oct 17
4
how to convert string to object?
temp = "~aparch(" temp1 = paste(temp,1, sep = "") temp2 = paste(temp1,1, sep = ",") temp3 = paste(temp2, ")",sep = "") temp 3 is a character but I want to convert to formula object. How do I do this? -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999281.html Sent from the R help mailing
2010 May 26
5
counts of a vector
Hi, I need help to find an efficient way to transform a vector like: a<-c(1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,1) in a vector that counts only di 1 elements, like: b<-c(1,2,0,1,0,0,0,1,2,3,4,0,1,0,1,2) Thank you! -- View this message in context: http://r.789695.n4.nabble.com/counts-of-a-vector-tp2232047p2232047.html Sent from the R help mailing list archive at Nabble.com.
2010 Aug 05
2
a question about 'read.table' with or without 'read.table'.(urgent)
Hi, I've got a quite tricky question. I have a txt file, named 'temp.txt', as the following: snp1 snp2 snp3 AA 00 00 GG GG 00 00 AA 00 I want to read the file into R. 1) when I use 'read.table' without 'header=T' option, > temp <- read.table('temp.txt') # I got > temp V1
2002 Dec 31
2
how to verify the connection between a Samba server and a Windows Xp client?
Hi, there, I have 2 machines ( running Linux Red Hat 8.0 and Windows Xp individually), which share a broadband Internet connection through a router. After installing Samba 2.2.7.a on Linux machine, I can use "smbclient" to access Windows machines, see the files and transfer files. Linux machine info: name: WINNY share folder name: gong ip: 192.168.123.153 valid
2007 Jun 25
1
Focus problem for shaded windows
Hi, today, I noticed a problem in focus handling for shaded windows which is pretty easy to reproduce: - Disable "Click to focus" - Shade a window - Hover another window - Hover back to the window frame of the shaded window - Press Ctrl+Alt+S Expected behaviour would be that the shaded window is unshaded. What happens is that the last active window is shaded. I investigated this a
2012 Jan 27
2
Placing a Shaded Box on a Plot
Hello, I would like to place shaded boxes on different areas of a phylogenetic tree plot. Since I can not determine how to find axes on the phylogenetic tree plot I am not able to place the box over certain areas. Below is example code for the shaded box that I have tried to use, and the first four values specify the position. rect(110, 400, 135, 450, col="grey",
2007 Nov 26
1
[PATCH] Don't draw shaded windows about to be destroyed
--- src/paint.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/paint.c b/src/paint.c index 00cbf73..4ddd332 100644 --- a/src/paint.c +++ b/src/paint.c @@ -193,7 +193,12 @@ paintOutputRegion (CompScreen *screen, if (w->destroyed) continue; - if (!w->shaded) + if (w->shaded) + { + if (w->id < 2) + continue; + } + else