similar to: Accessing Value of binom.test

Displaying 20 results from an estimated 3000 matches similar to: "Accessing Value of binom.test"

2006 Oct 19
5
binom.test
R-experts: A quick question, please. >From a lab exp, I got 12 positives out of 50. To get 90% CI for this , I think binom.test might be the one to be used. Is there a better way or function to calculate this? > binom.test(x=12, n=50, p=12/50, conf.level = 0.90) Exact binomial test data: 12 and 50 number of successes = 12, number of trials = 50, p-value = 1 alternative
2008 Dec 22
3
Convert ASCII string to Decimal in R (vice versa) was: Hex
Hi Dieter, Sorry my mistake. I wanted to convert them into Decimal (not Hexadecimal). Given this string, the 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
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
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
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
2006 Oct 11
2
expression as a parameter of binom.test (PR#9288)
Full_Name: Petr Savicky Version: 2.4.0 OS: Fedora Core release 2 Submission from: (NULL) (62.24.91.47) the error is > binom.test(0.56*10000,10000) Error in binom.test(0.56 * 10000, 10000) : 'x' must be nonnegative and integer while > binom.test(5600,10000) yields correct result. The same error occurrs for > binom.test(0.57*10000,10000)
2008 Sep 09
3
Splitting Data Frame into Two Based on Source Array
Dear all, Suppose I have this data frame: > data_main V1 V2 foo 13.1 bar 12.0 qux 10.4 cho 20.33 pox 8.21 And I want to split the data into two parts first part are the one contain in the source array: > src [1] "bar" "pox" and the other one the complement. In the end we hope to get this two dataframes: > data_child1 V1 V2 bar 13.1 pox
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
2012 Aug 20
1
The difference between chisq.test binom.test and pbinom
Hello all, I am trying to understand the different results I am getting from the following 3 commands: chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788 binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961 2*(1-pbinom(62,112, .512)) # p-value = 0.329 Well, the binom.test was supposed to be "exact" and give the same results as the pbinom, while the chisq.test
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 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
2003 Jan 22
2
small bug in binom.test?
Hi all, I am wondering whether there is a small bug in the binom.test function of the ctest library (I'm using R 1.6.0 on windows 2000, but Splus 2000 seems to have the same behaviour). Or perhaps I've misunderstood something. the command binom.test(11,100,p=0.1) and binom.test(9,100,p=0.1) give different p-values (see below). As 9 and 11 are equidistant from 10, the mean of the
2002 Sep 22
3
binom.test()
Hello everybody. Does anyone else find the last test in the following sequence odd? Can anyone else reproduce it or is it just me? > binom.test(100,200,0.13)$p.value [1] 2.357325e-36 > binom.test(100,200,0.013)$p.value [1] 6.146546e-131 > binom.test(100,200,0.0013)$p.value [1] 1.973702e-230 > binom.test(100,200,0.00013)$p.value [1] 0.9743334 (R 1.5.1, Linux RedHat 7.1) --
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
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
2009 Jan 13
3
Returning Non-Unique Index with Which (alternatives?)
Dear all, I tried to find index in repo given a query with this: > repo <- c("AAA", "AAT", "AAC", "AAG", "ATA", "ATT") > qr <- c("AAC", "ATT", "ATT") > which(repo%in%qr) [1] 3 6 Note that the query contain repeating elements, yet the output of which only returns unique. How can I make it
2009 Jan 13
3
Extracting Hash via Vector
Dear all, Suppose I have a hash created with this x <- list() for (i in c('test', 'some', 'more')){ x[[i]] <- runif(1) } then I want to extract the elem of that hash with a vector > q <- c("some", "more", "not_there") But why this failed? > extracted <- x[[q]] Error in x[[q]] : subscript out of bounds we expect the
2000 Oct 02
2
binom.test bug?
R. 1.1.0 The example below is self explanatory. ## 1 ## # works fine > binom.test((50*.64),50,.5,alt='g') ... Exact binomial test ... ## 2 ## # WHAT ! ? > binom.test((50*.65),50,.5,alt='g') Error in binom.test((50 * 0.65), 50, 0.5, alt = "g") : x must be an