search for: gundalav

Displaying 20 results from an estimated 109 matches for "gundalav".

Did you mean: gundala
2008 Dec 22
3
Convert ASCII string to Decimal in R (vice versa) was: Hex
...desired answer follows: > ascii_str <- "ORQ>IK" 79 82 81 62 73 75 > ascii_str2 <- "FDC" 70 68 67 - Gundala Viswanath Jakarta - Indonesia On Mon, Dec 22, 2008 at 5:49 PM, Dieter Menne <dieter.menne at menne-biomed.de> wrote: > Gundala Viswanath <gundalav <at> gmail.com> writes: > >> For example I have the following ASCII strings: >> >> > ascii_str <- "ORRRIROOQRQQOLORRRRRRQRROKK>IKFAA" >> > ascii_str2 <- "FFFFFFFFFFDDDDDDDDDDCCCCC>>>>>>>>>" >> &...
2008 Jul 07
4
Plot Mixtures of Synthetically Generated Gamma Distributions
Hi, I have the following vector which is created from 3 distinct distribution (three components) of gamma: x=c(rgamma(30,shape=.2,scale=14),rgamma(30,shape=12,scale=10),rgamma(30,shape=5,scale=6)) I want to plot the density curve of X, in a way that it shows a distinct 3 curves that represent each component. How can I do that? I tried this but doesn't work: lines(density(x)) Please
2013 Jun 11
2
ggpairs in GGally replaces plotmatrix in ggplot2
...Just trying to learn, > Thanks, > KW > > -- > > On Jun 11, 2013, at 6:00 AM, r-help-request at r-project.org wrote: > >> Message: 7 >> Date: Mon, 10 Jun 2013 06:05:48 -0800 >> From: John Kane <jrkrideau at inbox.com> >> To: Gundala Viswanath <gundalav at gmail.com>, "r-help at stat.math.ethz.ch" >> <r-help at stat.math.ethz.ch> >> Subject: Re: [R] All against all correlation matrix with GGPLOT Facet >> Message-ID: <3B7B03D1854.000003F5jrkrideau at inbox.com> >> Content-Type: text/plain; charset=&...
2008 Jun 24
5
Measuring Goodness of a Matrix
Hi all, Suppose I have 2 matrices A and B. And I want to measure how good each of this matrix is. So I intend to compare A and B with another "gold standard" matrix X. Meaning the more similar a matrix to X the better it is. What is the common way in R to measure matrix similarity (ie. A vs X, and B vs X) ? - Gundala Viswanath Jakarta - Indonesia
2010 Sep 30
4
How to get a proportion of a Vector Member
I have a vector that looks like this: > foo [1] "o" "o" "o" "x" "o" "o" "o" "o" "o" "x" "x" "o" "x How can we find the percentage of "o" and "x" in that vector in R? - G.V
2012 Mar 12
3
How to plot diagonal line at any coordinate range in R
Dear expert How can we plot diagonal across (from bottom-left-hand corner to top right-hand corner), at any given coordinate range For example > plot(c(-2,3), c(-1,5), type = "n", xlab="x", ylab="y", asp = 1) or > plot(c(0,1000), c(0,334), type = "n", xlab="x", ylab="y", asp = 1) I tried abline with the following but failed:
2013 Feb 01
3
Transforming 4x3 data frame into 2 column df in R
I have the following data frame: > foo w x y z n 1.51550092 1.4337572 1.2791624 1.1771230 q 0.09977303 0.8173761 1.6123402 0.1510737 r 1.17083866 1.2469347 0.8712135 0.8488029 What I want to do is to change it into : > newdf 1 n w 1.51550092 2 q w 0.09977303 3 r w 1.17083866 4 n x 1.43375725 5 q x 0.81737606 6 r x
2008 Aug 01
3
Grouping Index of Matrix Based on Certain Condition
Hi, I have the following (M x N) matrix, where M = 10 and N =2 What I intend to do is to group index of (M) based on this condition of "x_mn" , namely For each M, If x_m1 > x_m2, assign index of M to Group1 otherwise assign index of M into Group 2 > x [,1] [,2] [1,] 4.482909e-01 0.55170907 [2,] 9.479594e-01 0.05204063 [3,] 8.923553e-01 0.10764474
2008 Jun 23
3
Getting only label column of a data frame
Hi, How can I extract the label only from a given data frame. Fore example from this data frame. > print(dataf) V1 V2 V3 V4 V5 V6 V7 V8 V9 11145 14.3 17.1 31.2 41.7 45.8 49.8 68.6 70.6 72.9 3545 10.2 15.6 20.9 23.2 31.4 31.7 36.2 48.4 51.9 8951 15.2 17.5 20.0 21.4 32.4
2009 Jan 06
5
Changing Matrix Header
Dear all, I have the following matrix. > dat A A A A A A A A A A [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1 [3,] 0 0 0 0 0 0 0 0 0 2 How can I change it into: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0 0 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 0 1
2013 Jun 11
2
R-help Digest, Vol 124, Issue 12
...the "diag" parameter. Any suggestions? Just trying to learn, Thanks, KW -- On Jun 11, 2013, at 6:00 AM, r-help-request at r-project.org wrote: > Message: 7 > Date: Mon, 10 Jun 2013 06:05:48 -0800 > From: John Kane <jrkrideau at inbox.com> > To: Gundala Viswanath <gundalav at gmail.com>, "r-help at stat.math.ethz.ch" > <r-help at stat.math.ethz.ch> > Subject: Re: [R] All against all correlation matrix with GGPLOT Facet > Message-ID: <3B7B03D1854.000003F5jrkrideau at inbox.com> > Content-Type: text/plain; charset="US-ASCII&qu...
2008 Jun 20
1
Howto access V-base only column in a data frame
Hi, Suppose I have the following data frame: V1 V2 V3 var 1 100 200 400 2.3 2 40.5 1.2 20.3 ... In this example the maximum V column is 3. In my code there the column number can be varied. My question is how can I access data frame from column V1 up to Vk (some "k" and excluding'var' column)? - Gundala Viswanath Jakarta - Indonesia
2008 Dec 21
3
Globbing Files in R
Dear all, For example I want to process set of files. Typically Perl's idiom would be: __BEGIN__ @files = glob("/mydir/*.txt"); foreach my $file (@files) { # process the file } __END__ What's the R's way to do that? - Gundala Viswanath Jakarta - Indonesia
2008 Jun 12
1
Data.matrix fail to convert data.frame into matrix
Hi, With the following codes, I attempt to convert the data.frame into a matrix. However I notice that data.matrix function doesn't seem to work. __ BEGIN__ dat <- read.table("mydata", comment.char = "!" , na.strings = "null"); # Select n-genes by random sample # n = 1 nosamp <- 1 geneid <- sequence(nrow(dat)) geneid.samp <- sample(geneid,nosamp)
2008 Dec 24
2
Compressing String in R
Dear all, What's the R way to compress the string into smaller 2~3 char/digit length. In particular I want to compress string of length >=30 characters, e.g. ACGATACGGCGACCACCGAGATCTACACTCTTCC The reason I want to do that is because, there are billions of such string I want to print out. And I need to save disk space. - Gundala Viswanath Jakarta - Indonesia
2010 Jul 06
3
Conditional Splitting a Vectors into Two Vectors
Suppose I have two vectors of same dimensions: x <-c(0.49534,0.80796,0.93970,0.99998) count <-c(0,33,0,4) How can I group the vectors 'x' into two vectors: 1. Vector `grzero` that contain value in x with `count` value greater than 0 and 2. Vector `eqzero` with value in x with `count` value equal to zero. Yielding > print(grzero) > [1] 0.80796 0.99998
2008 Aug 05
2
Iterating Named List
Hi all, I have the following named list: > print(y) $`200052_s_at` [1] -1066.975 -1063.893 -1062.815 -1062.121 -1059.004 $`200071_at` [1] -959.823 -953.980 -953.886 -948.781 -974.890 $`200084_at` [1] -1135.804 -1132.863 -1128.197 -1128.633 -1125.890 What I want to do is to iterate this name list and process its members. To do that I attempt the following code (but failed): __BEGIN__ ny
2009 Jan 08
2
Faster Printing Alternatives to 'cat'
Dear all, I found that printing with 'cat' is very slow. For example in my machine this snippet __BEGIN__ # I need to resolve to use this type of loop. # because using write(), I need to create a matrix which # consumes so much memory. Note that "foo, bar, qux" object # is already very large (>2Gb) for ( s in 1:length(x) ) {
2009 Jan 09
4
Extracting File Basename without Extension
Dear all, The basename() function returns the extension also: > myfile <- "path1/path2/myoutput.txt" > basename(myfile) [1] "myoutput.txt" Is there any other function where it just returns plain base: "myoutput" i.e. without 'txt' - Gundala Viswanath Jakarta - Indonesia
2008 Jun 23
2
Pairwise Partitioning of a Vector
Hi, How can I partitioned an example vector like this > print(myvector) [1] 30.9 60.1 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 into the following pairwise partition: PAIR1 part1 = 30.9 part2 = 60.1 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 PAIR2 part1 = 30.9 60.1 part2 = 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 .... PAIR9 part1 = 30.9