Displaying 20 results from an estimated 10000 matches similar to: "newbie question on importing and parsing file by row"
2012 May 11
1
Fisher Test in R
Suppose we have the following data set:
Men Women
Dieting 10 30
Non-dieting 5 60
If I run the Fisher exact test in R then what does alternative = greater (or
less) imply? For example:
mat = matrix(c(10,5,30,60), 2,2)
fisher.test(mat,alternative ="greater")
I get the p-value = 0.01588 and odds ratio = 3.943534. Also, when I flip
the rows of
2002 Jul 28
2
timestamp on symlink
rsync does not sync the timestamp on symlink (Solaris 8).
It is probablly due to the limitation of Unix implementation
of symlink, but I would like to know why rsync/Unix does not
do this, and what we can do about it. Is the conclusion that
"rsync syncs everything except the timestamp on symlink"?
Why do I need timestamp on symlink? Supposed something stopped
working because something
2011 Feb 24
1
reshaping list into a contingency table
Hi all,
I have been struggling with this problem for a few days.
I have a data table like this:
gene rpkm1 diff1 rpkm2 diff2
gene1 23 50 13 120
gene2 111 220 827 1200
gene3 75 998 71 910
And I want to re-format it so that, for each gene, I have a 2x2 contingency
table, such as:
gene rpkm diff
gene1 23 50
gene1 13 120
gene2 111 220
gene2 827
2019 Apr 22
2
Icecast not connecting
Hello,
I’m reaching out because our online radio station (sites.up.edu/kdup/) has stopped streaming in the last week - the website itself works fine but when anyone attempts to listen to the live music stream they receive a message that says “cannot connect to the server “icecast.up.edu.” Do we need to update the server, or is this a problem that someone else can take care of? Let me know if I
2010 Jul 08
1
mimic SPSS contingency table results
Dear all
Seems that puzzles always come in packs. I was asked to help with some
statistics in blood analysis. (You can not refuse your wife's asks :-).
She has contingency table for values IgVH mutation and ZAP expression. I
can do chi-square test (in R) and get a results, and with some literature
I can try explain them. However she found an article in which they use
SPSS and use
2005 Jun 03
3
p-value > 1 in fisher.test()
The following contingency table generates p-value > 1 from fisher.test()
ff = c(0,10,250,5000); dim(ff) = c(2,2); fhisher.test(ff)$p.value
Sean
[[alternative HTML version deleted]]
2005 Jun 03
3
p-value > 1 in fisher.test()
The following contingency table generates p-value > 1 from fisher.test()
ff = c(0,10,250,5000); dim(ff) = c(2,2); fhisher.test(ff)$p.value
Sean
[[alternative HTML version deleted]]
2005 Feb 15
1
Tests on contingency tables
Dear all,
I have a dataset with qualitative variables (factors) and I want to test the
null hypothesis of independance between two variables for each pair by using
appropriate tests on contingency tables.
I first applied chisq.test and obtained dependance in almost all cases with
extremely small p-values and warning messages.
> chisq.test(table(data$ins.f, data$ins.st))$p.val
[1]
2000 Feb 10
1
smbmount/smbumount getting rid of dead connections
I've got a win98 laptop and a linux box. On my linux box, I smbmount
a directory from the laptop. Alas, win98 boxes
crash a lot, and I move the laptop a lot... to and from work.
If the laptop crashes or if I move it with a shared directory mounted
on my linux box, that mount gets "Stuck".... it's
present in /etc/mtab but when I cd to it and do an ls it says:
243 emily ~>ls
2004 Oct 09
2
Is it safe? Cochran etc
I have the following contingency table
dat <- matrix(c(1,506,13714,878702),nr=2)
And I want to test if their is an association between events
A:{a,not(a)} and B:{b,not(b)}
| b | not(b) |
--------+-----+--------+
a | 1 | 13714 |
--------+-----+--------+
not(a) | 506 | 878702 |
--------+-----+--------+
I am worried that prop.test and chisq.test are not valid given the
2005 Nov 18
2
(no subject)
Hi,
I need to run a Fisher's exact test on thousands of 2x2 contingency tables, and
repeat this process several thousand times (this is a part of the permutation
test for a genome-wide association study).
How can I run this process most efficiently? Is there any way to optimize R code?
I have my data in a 2x2xN array (N ~ 5 K; eventually N will be ~ 500 K), and use
apply inside the loop:
2004 Nov 11
5
expressions and paste
I have written a function to plot data which will be used for various different chemistries.
A simplified version is:
plot_data <- function(risk,levels,chem,sd2,measure){
plot(risk, levels,main=paste ("per", sd2, measure, "\n in usual", chem))
}
The problem is with the title.
This works fine if the variable "chem" is just text, but if it is an expression then
2010 Aug 15
2
legend outside plot area
Hi, please can you help me. When I add a legend to a boxplot it appears inside the plot area, how do you get it into the margins? I have already changed the parameters so there is space for it on the margin on the right hand side of the graph.
Thanks, Emily
[[alternative HTML version deleted]]
2012 Mar 15
1
Equation as a character string
I'm trying to figure out if it's possible to use a character string as an
equation, e.g:
eqn1string <- "x^2 + x + 5"
Then I want to tell R:
1) that eqn1string is actually an equation (even though it was stored as a
character string), and
2) to apply the equation to a specified value of x (e.g. given x <- 6,
what is the result of the equation).
Thanks in advance for any
2003 Aug 29
1
converting from courier-imap
Hello. I apologize if there is a simple answer to this question, but I
haven't been able to figure it out. Our people use various clients (pine
4.50 with maildir patch, eudora, messenger, outlook, squirrelmail), and
all of them work with courier-imap. But I've become very interested in
dovecot after reading about it, so I'm trying it out on another server.
The results are mixed.
2006 Oct 03
1
Reshape into a contingency table/Fisher's test
Dear all,
how can I "reshape"/"cast" the following matrix
00;01;10;11
John.Mike;123;313;12;31
John.Jim;54;57;39;36
John.Steve;135;47;47;74
Mike.Jim;63;37;27;16
Mike.Steve;15;15;5;61
Jim.Steve;6;10;34;35
into a set of stacked 2x2 contingency tables
0;1
John;123;12
Mike;313;31
John;54;39
Jim;57;36
John;135;47
Steve;47;16
...
so that the "fisher.test" and
2014 Jul 21
1
create R package include Fortran source code.
Hello, all
I am building a R package using Fortran source code. The Fortran code is a
subroutine. I can use "R CMD SHLIB bar.f -o bar.o" to create the shared
library. For the R package, I put the fortran file in the src/ and I use R
code as follows:
".First.lib"<-function(libname,pkgname){library.dynam("barpkg",pkgname,libname)}
barfun<-function(n,x){
2023 Apr 12
2
Split String in regex while Keeping Delimiter
I thought replacing the spaces following instances of +++,++,+,- with "\n" and then reading with scan should succeed. Like Ivan Krylov I was fairly sure that you meant the minus sign to be "-" rather than "?", but perhaps your were using MS Word as an editor which is inconsistent with effective use of R. If so, learn to use a proper programming editor, and in any case
2004 Jun 17
1
Bug in FEXACT: gave negative key (PR#6986)
Hello,
I'm using R to apply Fishers exact test to a whole pile of
contingency tables, and I've run into the bug shown below.
regards,
Francis
--
> dat1 = matrix(c(0,1,0,1,0,0,1,0,0,0,1,0,1,0,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,
1,1,0,0,1,0,0,1,0,0,1,0,0,3,0,0,2,0,0,1,0,0,0,1,0,0,2,0,0,
2,0,0,1,0,1,0,0,3,0,0,2,0,0,0,1,0,5,0,0,0,1,0,1,0,0), nrow=3)
>
2013 Jan 27
1
Removing values containing a specific character
Awesome, thanks Arun, that's exactly what I was looking for!
On Sat, Jan 26, 2013 at 9:21 PM, arun kirshna [via R] <
ml-node+s789695n4656749h63@n4.nabble.com> wrote:
> Hi,
> Try this:
> df[]<-lapply(df,as.character)
> df2<-df
> df[,1][grep("@",df$names)]<- ""
> df
> #names emails
> #1 bob bobj@cup.com
> #2