Displaying 20 results from an estimated 1000 matches similar to: "how to aggregate T-test result in an elegant way?"
2013 Jan 23
4
how to read a df like that and transform it?
Dear all
I have a data.frame like that :
father mother num_daughter daughter
291 3906 0 NULL
275 4219 0 NULL
273 4236 1 49410
281 4163 1 49408
274 4226 1 49406
295 3869 2 49403
49404
287 4113 0 NULL
295 3871 1 49401
292 3895 4 49396
49397
49398
49399
291 3900 3 49392
How to read it into R and transform it like that:
father mother num_daughter
2013 Mar 19
2
how to do association study based on mixed linear model
Dear All:
I want to do association study based on mixed linear model,
My model not only includes serval fixed effects and random effects but
also incorporates some covariates such as "birth weight".
Otherwise, the size of the data are about 180 individuals and 12
variables and 60000 Fixed effect estimates
As asreml-R is not free ,is there any packages for my study?
I heard nlme or
2012 Dec 16
3
how to handle NA values in aggregate()
Dear All:
I am trying to calculate four columns' means in a dataframe like this:
FID MID IID EW_INCU EW_17.5 EMW EEratio
1 4621 TWF2H5 45.26 NA 15.61 NA
1 4621 TWF2H6 48.02 44.09 13.41 0.3041506
2 4630 TWF2H19 51.44 47.81 NA NA
2 4631 TWF2H21 NA 52.72 16.70
2013 Mar 06
1
Transpose a big data file and write to a new file
Dear all:
I have a big data file of 60000 columns and 60000 rows like that:
AA AC AA AA .......AT
CC CC CT CT.......TC
..........................
.........................
I want to transpose it and the output is a new like that
AA CC ............
AC CC............
AA CT.............
AA CT.........
....................
....................
AT TC.............
The keypoint is I can't read
2012 Dec 20
2
how to read different files into different objects in one time?
Dear All
I have a lot of files in a directory as follows:
"02-03.txt" "03-04.txt" "04-05.txt" "05-06.txt" "06-07.txt"
"07-08.txt" "08-09.txt"
"09-10.txt" "G0.txt" "G1.txt" "raw_ped.txt"
..........................
I want to read them into different objects according
2012 Dec 13
2
How to select a subset data to do a barplot in ggplot2
Hi,everybody
I have a dataframe like this
FID IID STATUS
1 4621 live
1 4628 dead
2 4631 live
2 4632 live
2 4633 live
2 4634 live
6 4675 live
6 4679 dead
10 4716 dead
10 4719 live
10 4721 dead
11 4726 live
11 4728 nosperm
11 4730 nosperm
12 4732 live
17 4783 live
17 4783 live
17 4784 live
2013 Jan 08
1
ggplot not showing all the years on the x-axis
Dear R helpers,
I am currently having hard time fixing the values on the x-axis of a plot
with ggplot: even though I have 12 years, ggplot plots only 3 of them.
Here is my example:
library(ggplot2)
ii <- 2000:2011
ss <- rnorm(12,0,1)
pm <- data.frame(ii,ss)
tmpplot <- ggplot(pm, aes(x = ii, y = ss))
plot <- tmpplot + geom_line()
plot
In my case, ggplot reports on the year 2000,
2013 Jan 09
4
how to count "A","C","T","G" in each row in a big data.frame?
Dear All
I have a data.frame like that:
structure(list(name = c("Gga_rs10722041", "Gga_rs10722249", "Gga_rs10722565",
"Gga_rs10723082", "Gga_rs10723993", "Gga_rs10724555", "Gga_rs10726238",
"Gga_rs10726461", "Gga_rs10726774", "Gga_rs10726967", "Gga_rs10727581",
"Gga_rs10728004",
2013 Mar 07
2
How to transpose it in a fast way?
Dear all:
I have a big data file of 60000 columns and 60000 rows like that:
AA AC AA AA .......AT
CC CC CT CT.......TC
..........................
.........................
I want to transpose it and the output is a new like that
AA CC ............
AC CC............
AA CT.............
AA CT.........
....................
....................
AT TC.............
The keypoint is I can't read
2013 Jan 10
1
how to generate a matrix by an my data.frame
Dear All
It is a little hard to give a good small example of my question,so I
will show the full data on the bottom and the attachment.Maybe some
one could tell me an appropriate way
to show it.I'm sorry for the inconvenience.
Q:How to generate a 53*53 diagonal matrix by my data
Some problems confused me are that:
1.Since it is a diagonal matrix,I have tried to transform col1 and
col2 to
2004 Jun 18
1
how to store estimates results as scalars of a matrix?
Dear R users,
I've written a loop to generate Moran's test (spdep package) on serval
subsamples of a large dataset. See below a short example.
My loop is working fine, however I would like to be able to store the test
results as lines of a matrix, that I would latter be able to export as a
dataset. My problem is that I'm not sure how I could do this using R.
Any help will be much
2003 Aug 15
2
help with Tukey Mean-Difference Plot
Dear R users,
I would appreciate for some advise how to generate a Tukey
Mean-Difference Plot with the tmd function part of the lattice
library. I have two test results (log transformed) which showing a
correlation on a scatterplot. However the correlation line is
parallel displaced depending on a clinical condition. I thought to a
Tukey Mean Difference Plot would show me the difference
2009 Jun 04
5
Problem installing RCS on SXCE
I was shocked to find no RCS on SXCE 107. I needed it to update some
RCS archives I had copied over.
No problem - go to sunfreeware and copy it over. No OpenSolaris branch?
The Solaris 10 package should work.
Only the package install appears to complete and does not - as
documented only in a log file, not on my screen.
OK then, the source for RCS should be easily compiled and installed, I
2003 Sep 16
3
Question in Using sink function
Could anyone please explain to me why the following writes nothing into
"all.Rout"
file? If the "for" loop is removed, t.test output can be written into
"all.out".
Thanks in advance.
Minghua Yao
......
zz <- file("all.Rout", open="wt")
sink(zz)
for(i in 1:n)
{
Cy3<-X[,2*i-1];
Cy5<-X[,2*i];
t.test(Cy3, Cy5)
2012 Oct 10
7
multiple t-tests across similar variable names
Hi everyone-
I have a dataset with multiple "pre" and "post" variables I want to compare. The variables are named "apple_pre" or "pre_banana" with the corresponding post variables named "apple_post" or "post_banana". The variables are in no particular order.
apple_pre orange_pre orange_post pre_banana apple_post post_banana
person_1
2004 Apr 29
5
Problems in plot
Hello,
I have R1.9.0 under Windows XP. My program plots several plots using
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
Sometimes, one of them generates a small frame only with title area "R graphics: Device X (ACTIVE)". The message in the console window is
Error in plot.new() : Figure margins too large
2003 Apr 10
3
A Question on lowess() function
Hi, all,
I want to use lowess(x, y) where x and y are vectors of length of 4000+. In
fact, x and y are log of some vectors. So, some of the elements are NaN.
lowess() can not take away those elements then do the fitting. It will give
the error message and do nothing.
1. Can anybody tell me how to get rid of those NaN's and use lowess()?
2. How to get the LOWESS fitting values for any
2011 May 06
9
Generate "Compiled catalog"/yaml for a node?
Hi Experts,
I remember we had this discussion before, but could find it.
Can I run a command to generate a "Compiled catalog" for a specific node (on
the master node)? And apply this on the client node? What are the
limitations for doing this?
Basically we have special handling for the webserver/CA part of puppet.
Thank you very much!
-Yushu
2004 Jun 01
1
swapping with data.frame
Hi there,
I have some data which are convenient to enter as lists. For example:
t1<-list(fname="animal1",testname="hyla",dspkr="left",res1=39.7,res2=15.0)
t2<-list(fname="animal1",testname="bufo",dspkr="left",res1=14.4,res2=56.1)
2013 Nov 21
1
how can I import a number of datsets in a folder in my working directory to a list in R
Hi,
Suppose, if I create 15 files in my working directory.
set.seed(48)
lapply(1:15,function(i) {m1 <- matrix(sample(1:20,1686*2,replace=TRUE),nrow=1686,ncol=2); write.table(m1,paste0("file_",i,".txt"),row.names=FALSE,quote=FALSE)})
?D <-dir()
D1 <- D[order(as.numeric(gsub("\\D+","",D)))]
D1
?res <- t(sapply(D1,function(x) {x1<-