similar to: Problems reshaping data with cast()

Displaying 20 results from an estimated 5000 matches similar to: "Problems reshaping data with cast()"

2007 Nov 22
1
Package specific dependencies...
Hi, I noticed recently when installing the GDD package for R under GNU/Linux that it required the gd library (http://libgd.org/) for generating graphics. The resolution of this was to simply install the library on my system, and then GDD successfully installed without any complaints. However, the variant of GNU/Linux that I use is Gentoo, so I filed a bug requesting that a USE flag be set for
2008 Feb 28
1
Errors melt()ing data...
Hi, I'm trying to melt() some data for subsequent cast()ing and am encoutering errors. The overall process requires a couple of casts()s and melt()s. ########Start Session 1########## ## I have the data in a (fully) melted format and can cast it fine... > norm1[1:10,] Pool SNP Sample.Name variable value 1 1 rs1045485 CA0092 Height.1 0.003488853 2 1 rs1045485
2007 Jun 25
2
Re : Half of a heatmap
> I am trying to produce a heatmap of pairwise correlations, but since the matrix is > symmetric, I only need either the upper or the lower triangle. I have scoured the > web and R documentation, but I have not been able to find a way to produce such a > figure. Is there a simple way to produce a heat map with only the part above or > below the diagonal? You might want to check
2008 Feb 25
3
Logical statements and subseting data...
Hi, I'm scratching my head as to why I can't use the subset() command to remove one line of data from a data frame. There is just one row (out of 45840) that I'd like to remove and it can be identified using.... > dim(raw.all.clean) [1] 45840 10 > subset(raw.all.clean, Height.1 == 0 & Height.2 == 0) Sample.Name Well SNP Allele.1 Allele.2 Size.1 Size.2
2006 Feb 16
3
Sweave - problems with underscores in variable names...
Hi all, I've just started using the Friedrich Leisch's Sweave package to generate LaTeX reports with results of my analyses embedded as required. I've encountered a bit of a problem though in the processing of the resulting *.tex file that is as far as I can tell, down to the fact that my variable names have underscores ('_') in their names. The relevant section of code
2008 Feb 29
3
Graphic text
Can R handle graphic text ? I mean something like a pop-up message window or a text widget ? Thank you so much. -- Maura E.M
2006 Apr 06
4
Reshaping genetic data from long to wide
Bottom Line Up Front: How does one reshape genetic data from long to wide? I currently have a lot of data. About 180 individuals (some probands/patients, some parents, rare siblings) and SNP data from 6000 loci on each. The standard formats seem to be something along the lines of Famid, pid, fatid, motid, affected, sex, locus1Allele1, locus1Allele2, locus2Allele1, locus2Allele2, etc In other
2010 Jul 21
2
Issues reshaping data
Hello All, I'm having some trouble reshaping my data from wide to long format. I have tried using both the reshape function and package. Although I haven't worked much with the reshape function, I have found the reshape package useful and intuitive for reshaping data from long to wide format. However, going the other way has me stumped with this type of data. My data is set up, roughly,
2011 Jun 15
1
Reshaping data with xtabs reorders my rows
Dear, I have a data frame melted from a list of matrices (melt from reshape package), then I impute some missing values and then want to tabulate the data again to the array (or list, doesn't matter) of matrices form. However when using xtabs function it orders my rows alphabetically and apparently doesn't take "reorder = FALSE" option or anything like it. Is there anything I
2011 Aug 25
1
Specifying argument values in a function
Hello all, I am trying write a fairly simple function that provide a quick way to calculate several distributions for a data set. I am trying to provide a function that has a argument that specifies which distribution is outputted (here "norm" or "cumu"). I also have a melt argument but that seems to be working fine. I have been able to get my function working well for just
2005 Jun 08
2
CRAN task view for genetics
Hello to everyone! I have built CRAN task view for genetics. For now I have not submit it to CRAN yet and it can be accessible from: http://www.bfro.uni-lj.si/MR/ggorjan/software/R/Genetics.html http://www.bfro.uni-lj.si/MR/ggorjan/software/R/Genetics.ctv I have not submitted it to CRAN, since I would like first some opinion about it. Genetics is really so broad field that I belive one person
2007 Jul 30
3
Slightly OT - use of R
I am trying to get a measure of how R compares in usage as a statistical platform compared to other software. I would guess it is the most widely used among statisticians at least by virtue of it being open source. But is there any study to which I can refer? By asking this list I am not exactly adopting a rigorous approach! Best wishes John John Logsdon
2011 May 17
2
reshaping issue
Dear R users, I have a problem with reshaping data. I know such questions have been asked before, but I can't get it right, neither with the reshape function nor with the melt function. My dataset has about 407 variables and about 48000 cases. Each case looks as follows: V1 v2 v3 v4 v5 v6 v7 x1 y1 x2 y2 .... x200 y200 V1 is unique, v2-v7 are
2007 Jul 18
0
Re : Combine R2HTML and Rcmd BATCH?
> I have an R script that spawns output in the form of an HTML page. This > is done by the R2HTML package. > > Now I want to run the same script using Rcmd BATCH. However, it seems > that it is not possible to use R2HTML in this case. > > My script ends with this error message: > ######################### > Error in dev.print(png, file = AbsGraphFileName, width = Width,
2007 Jul 23
1
problems with character objects and calls to list()
Hi All, I have a problem trying to get a set of columns recognised as a list and can't work out how to do it despite trawling through the mailing list archives, and docs. A short example... to.convert <- NULL n <- 6 for(x in 1:n){ to.convert <- paste(to.convert, paste((2 * x) -1, (2 * x), sep=":"), sep=",") } to.convert <- gsub("^,", "",
2006 Dec 18
1
Memory problem on a linux cluster using a large data set
Hello, I have a large data set 320.000 rows and 1000 columns. All the data has the values 0,1,2. I wrote a script to remove all the rows with more than 46 missing values. This works perfect on a smaller dataset. But the problem arises when I try to run it on the larger data set I get an error “cannot allocate vector size 1240 kb”. I’ve searched through previous posts and found out that it might
2006 Apr 26
2
help in R
Hi, I cant understand where I am going wrong.Below is my code.I would really appreciate your help. Thanks. > genfile<-read.table("c:/tina/phd/bs871/hw/genfile.txt",skip=1) > > #read in SNP data > snp.dat <- as.matrix(genfile) > snp.name <- scan("c:/tina/phd/bs871/hw/genfile.txt",nline=1,what="character") Read 100 items
2011 Oct 27
3
2 x 3 Probability under the null
I have a 2 x 3 matrix called snp and I want to compute the following probability: choose(sum(snp[,1]), snp[1,1]) * choose(sum(snp[,2]), snp[1,2]) * choose(sum(snp[,3]), snp[1,3])/choose(sum(snp), sum(snp[1,])) but I keep getting Infs and NaNs. Is there a function that can do this in R? -- Thanks, Jim. [[alternative HTML version deleted]]
2007 Jan 10
1
Fw: Memory problem on a linux cluster using a large data set [Broadcast]
Hi I listened to all your advise and ran my data on a computer with a 64 bits procesor but i still get the same error saying "it cannot allocate a vector of that size 1240 kb" . I don't want to cut my data in smaller pieces because we are looking at interaction. So are there any other options for me to try out or should i wait for the development of more advanced computers!
2007 Jan 21
2
efficient code. how to reduce running time?
Hi, I am new to R. and even though I've made my code to run and do what it needs to . It is taking forever and I can't use it like this. I was wondering if you could help me find ways to fix the code to run faster. Here are my codes.. the data set is a bunch of 0s and 1s in a data.frame. What I am doing is this. I pick a column and make up a new column Y with values associated with that