Displaying 7 results from an estimated 7 matches for "wg2f".
Did you mean:
wg21
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 Nov 08
5
How to plot a normal distribution curve and a shaded tail with alpha?
I want to create a graph to express the idea of the area under a pdf curve,
like
http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg
Thank you for any help.
-----
A R learner.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-plot-a-normal-distribution-curve-and-a-shaded-tail-with-alpha-tp3032194p3032194.html
Sent from the R help mailing list archive at Nabble.com.
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 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 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 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