similar to: need help on melt/cast

Displaying 20 results from an estimated 10000 matches similar to: "need help on melt/cast"

2012 Oct 01
3
calculating probability from the density function
Hello, I have a data x with normal (or very close to normal) distribution, I can plot a density distribution with density(x,...). My question is is there any way to calculate an area under this distribution (=probability) for particular range of x values, let's say for x from 0 to 2? I was not able to find any kind of simple procedure to do this. Thanks in advance for your help, Evgeny.
2013 Mar 18
2
melt with complications
## Can someone suggest a simpler expression than either of these, with the goal ## of taking a long matrix into a wide one with exactly one of the factors converted to ## columns and all the rest retained as factors. I want something that generalizes beyond ## the three factors illustrated here. ## Rich meltTest <- data.frame(A=rep(c("B","C"), each=12),
2011 Oct 05
1
white on black theme for ggplot2
Hello, I'm trying to produce some plots in ggplot2 to use them on the dark-blue gradient background. I am wondering if there is already any theme/set of options that I can use to change the color scheme and add transparency. Thank you very much, Evgeny. [[alternative HTML version deleted]]
2008 Jan 15
1
bug in mmlcr ? (PR#10576)
Hi the list. Is there a bug in mmlcr package ? The following code does not compile: mmlcrTest <- function(dataW){ dataL <- reshape(dataW,idvar="id",timevar="T",varying=list("T0","T1","T2"),direction="long",v.names="score") resultR <- mmlcr(outer= ~ 1 | id, components = list(list(formula =
2011 Mar 12
2
how to use melt cast commands in R in window7
Hi, I have installed R on my computer with windows 7 . I also installed reshape software, but I am not being able to work with melt cast commands . I have chjecked the commands.It is not working. Thankyou, Deepika [[alternative HTML version deleted]]
2012 Oct 17
1
Comparing dcast and reshape
I'm in the middle of my own little intellectual exercise comparing dcast() and reshape() and have successfully stumped myself. I want to melt() a data frame, then dcast() it into a new form. After doing so, I want to duplicate the process using reshape(). So far, I can do the melt and cast require(reshape2) Raw <- data.frame(site = c(1, 1, 1, 1, 2, 2, 2, 2), id =
2012 May 07
2
how to deduplicate records, e.g. using melt() and cast()
Esteemed UseRs, This must be embarrassingly trivial to achieve with e.g., melt() and cast(): deduplicating records ("pw.X" in example) for a given set of responses ("cond.Y" in example). Hopefully the runnable example shows clearly what i have and what i'm trying to convert it to. But i'm just not getting it, ?cast that is! So i'd really appreciate some ones
2013 Jan 04
3
help "reshaping" dataframe
List, I want to reshape my data, but I'm not sure how to do it... it might be a simple task, but don't know which package does this. "occ.data" (see below) is how my original data are arranged, and I know that with melt() I can reshape it like "y" (see below). However, I just want to build a matrix like the "y" matrix, but with only 2 dimensions. Something
2011 Mar 10
2
Reshape, melt and cast query
I have a dataset that is based on crop output for a single crop *sugarcane*...but each observation is further subdivided into 3 kinds of sugarcane i have read the file and have also used melt it to sort it on the basis of *crop group* using melt(sugarcane, m=c("Crop_group")) -> canefile this is how it has cast the data variable value 1 Crop_group Sugarcane
2008 Aug 02
4
RE SHAPE package question.
Hi there, I am trying to reorganized my data sets so that it is easy for MARK to read it. Basically I have the encounter histories of 1837 butterflies The data looks like this the first 4 columns are the occasions and the last two code for male and female > t1 t2 t3 t4 M F > 1 0 0 0 1 0 male capture on time1 but not seen on time 2, 3 > and 4 > 1 0 0 0
2012 May 21
1
help with melt/cast in reshape-package
I'm sorry everyone for the inconvenience of spamming the R-help... Here's the complete post: Hi everyone, > > Since it's quite a while that I used the reshape package, I now feel kind > of rusty. > > I have a data.frame like this: > > > > id Sample.Name Marker Allele.1 > Allele.2 sample_id species
2003 Oct 30
1
Trouble reshaping some data
I would appreciate some advice on the following task. I have some data that currently looks like this: t1 <- data.frame(id=c(1,1,2,2), aspect=c("A","B","A","B"), score=c(10,9,11,12)) I'd like it to look like this: id A B 1 10 9 2 11 12 reshape() looks like a good candidate for this job but I'm not really sure about the roles of
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
2012 Dec 13
2
More efficient use of reshape?
Hi all, I have played a bit with the "reshape" package and function along with "melt" and "cast", but I feel I still don't have a good handle on how to use them efficiently. Below I have included a application of "reshape" that is rather clunky and I'm hoping someone can offer advice on how to use reshape (or melt/cast) more efficiently. #For this
2012 Jul 18
2
How to have original (name) order after melt and cast command
Dear R helpers, I have a data.frame as given below - dat1 = data.frame(date = as.Date(c("3/30/12","3/29/12","3/28/12","3/27/12","3/26/12", "3/23/12","3/22/12","3/21/12","3/20/12", "3/30/12","3/29/12","3/28/12","3/27/12",
2010 May 17
1
Query on linear mixed model
Hi R Forum I am a newbie to R and I have been amazed by what I can get my team to accomplish just by implementing Scripting routines of R in all my team's areas of interest.. Recently i have been trying to adopt R scripting routine for some analysis with longitudanal data.. I am presenting my R script below that I have tried to make to automate data analysis for longitudanal data by employing
2009 Dec 13
2
Reshape a data set
I am trying to reshape a data set. Could someone please help me with the reshape, cast, and melt functions? I am new to R and I have tried reading up on how to use the reshape package, but I am very confused. Here is an example of what I am trying to do: subject coder score time [1,] 1 1 20 5 [2,] 1 2 30 4 [3,] 2 3 10 10 [4,] 2 2
2010 Apr 23
6
transpose? reshape? flipping? challenge with data frame
Greetings all, I am having difficulty transposing, reshaping, flipping (not sure which) a data frame which is read from a DBF file. I have tried using t(), reshape() and other approaches without success. Can anyone please suggest an way (elegant or not) of flipping this data around ? The initial data is like propsum (defined below), and I want it to look like tpropsum once reformed. >
2010 Jun 18
3
inverse function of melt
Dear list, I'm looking for an inverse function of melt(which is in package reshape).Namely, I had a data frame like this (Table1) YEAR VAR1 VAR2 VAR3 1995 7 3 45 1996 5 6 32 1997 6 10 15 I transformed my data by using the melt function and my data was reshaped in the following format: (Table2) YEAR variable
2010 Feb 06
3
melt on OSX ignores na.rm=T
Hi list, I run R on Linux and OSX. On both systems I use R version 2.9.2 (2009-08-24) and reshape version: 0.8.2 (2008-11-04). When I do a melt with na.rm=T on a data frame I get different results on these systems: library(reshape) x <- read.table(textConnection("char trial wn p E10I13D0 4 r E10I13D0 4 a E10I13D0 4 c E10I13D0 4 t E10I13D0 4 i E10I13D0 4 c E10I13D0 4 e E10I13D0