search for: melting

Displaying 20 results from an estimated 796 matches for "melting".

Did you mean: meeting
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
2008 Dec 10
4
tapply within a data.frame: a simpler alternative?
Dear list, I have a data.frame with x, y values and a 3-level factor "group", say. I want to create a new column in this data.frame with the values of y scaled to 1 by group. Perhaps the example below describes it best: > x <- seq(0, 10, len=100) > my.df <- data.frame(x = rep(x, 3), y=c(3*sin(x), 2*cos(x), > cos(2*x)), # note how the y values have a different
2017 Jul 24
0
Compare output of Violin plot from ggplot2 and vioplot . Need Explanation
Hi,? I have made violin plot with both ggplot2 and vioplot package with same data.? The results and code are as follows.? ################### ?Loading data? data.melt <- dget("https://gubox.box.com/shared/static/rirth0eym114afwyjxwe128sjzipzdym.txt") ################### ?Violin plot by library(vioplot) library(vioplot) data.use_11<- data.melt$value[data.melt$ident == 0]
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that the melt() function call is syntactically correct. The unmodifed data frame is organized this way: head(tds.anal) site sampdate param quant 1 UDS-O 2006-12-06 TDS 10800 4 STC-FS 1996-06-14 Cond 280 7 UDS-O 2007-10-04 Mg 1620 9 UDS-O 2007-10-04 SO4 7580 19 JCM-10B 2007-06-21 Ca 79 20
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
2011 Sep 22
7
need help on melt/cast
Hello, I need to convert dataframe from: ID T0 T1 T2 A 1 2 3 B 4 5 6 C 7 8 9 to: ID Variable Value A T0 1 A T1 2 A T2 3 B T0 4 B T1 5 B T2 6 C T0 7 C T1 8 C T2 9 i tried to use melt cast but it gives me all the time not exactly what I need. Thank
2008 Jul 25
3
melting a list: basic question
Dear list, I'm trying to use the reshape package to perform a merging operation on a list of data.frames as illustrated below, > a <- 1:10 > example <- list( data.frame(a=a, b=sin(a)), data.frame(a=a, > b=cos(a)) ) > > melt(example, id = a) this produces the desired result, where the data.frames have been coerced into one with a common identifier variable
2008 Feb 07
1
Problems reshaping data with cast()
Hi, I'm trying to cast() some data, but keep on getting the following error... > norm.all.melted.height <- transform(all.melted.height, + norm.height = value / ave(value, SNP, Pool, FUN = max) + ) Warning messages: 1: In FUN(X[[147L]], ...) : no non-missing arguments to max; returning -Inf 2: In FUN(X[[147L]],
2009 Jan 22
1
melt stumbles over deleted columns
I have a data frame that is the result of a cast (reshape) operation. I deleted the variable column and tried to melt the resulting data frame. Depending on which method I use to delete the column I get different error messages when melting: > head(tinfos) vpn group trial_no item relation trial_type rt variable # 1 102 2 1 4351 diag1 distractor 8471 fix_d 27 2 102 2 2 1214 id target 4072 fix_d 17 3 102 2 3 4213 diag1 distractor 7040 fix_d 27 4 1...
2010 Dec 10
1
melt causes errors when characters and values are used
Hello, I am finding that the melt function from the reshape library causes errors when applied to a data.frame that contains numeric and character columns. For example, melt(id.vars="ID",data.frame(ID=1:3,date=c("a","b","c"),value=c(1,4,5))) ID variable value 1 1 date a 2 2 date b 3 3 date c 4 1 value <NA> 5 2
2013 Nov 23
1
how to melt variable to one variable
I want to make a stacked bar plot with one bar for two variables from my data "chir", the two variables have about 100 values like no, yes and na. I want to show how many no, yes and na they both have together with the stacked bar. I tried to melt these to variables first like this: melt1=melt(data_chir, measure.vars=c("N1_re", "N2_re"), var="zpd") but it
2011 Oct 31
1
reshape2: Lost Values Between melt() and dcast()
Working with 5 subset streams from my source data frame, three of them successfully call dcast(), but two fail: jerritt.cast <- dcast(jerritt.melt, site + sampdate ~ param) Aggregation function missing: defaulting to length and winters.cast <- dcast(winters.melt, site + sampdate ~ param) Aggregation function missing: defaulting to length Yet both data frames have the values in their
2012 Jul 25
2
reshape -> reshape 2: function cast changed?
Hi, I used to use reshape and moved to reshape2 (R 2.15.1). Now I tried some of my older scripts and was surprised that my cast function wasn't working like before. What I did/want to do: 1) Melt a dataframe based on a vector specifying column names as measure.vars. Thats working so far: dfm <- melt(df, measure.vars=n, variable_name = "species", na.rm = FALSE) 2) Recast the
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
2016 Jun 24
3
Ayuda ggplot2
Hola a todos! Soy nueva en R y necesito hacer unos gráficos para una investigación, he explorado un poco y estoy intentando usar ggplot2 ya que hace gráficos de muy buena calidad...tengo los datos de varios años para diferentes grupos de empresas y los pretendo graficar tanto en un solo grafico como en varios (facet_wrap) pero tengo problemas con el eje de las X, ya que necesito que aparezcan los
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 =
2013 Nov 17
1
melt dataframe
Hi, Try: dat1 <- read.csv("precipitationRglimclim.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t") library(reshape2) dat2M <- melt(dat1,id.var=c("year","month","day")) dat2M1 <- dat2M[with(dat2M,order(year,month,day,variable)),] ?dim(dat2M1) #[1] 1972320?????? 5 ?row.names(dat2M1) <- 1:nrow(dat2M1) ?colnames(dat2M1)[4:5] <-
2013 Jan 16
4
Changing frequency values to 1 and 0
...with a large data set, where I grouped several species in one group (guild). Then I reshaped my data as shown below. Now, I just want to have "Rep" only as 1 or 0. I'm not being able to change the values of rep>=1 to 1... tried many things and I'm not being successful! > melting=melt(occ.data,id.var=c("guild", "Site", "Rep", "Año"), measure.var="Pres") > y=cast(melting, Site ~ Rep ~ guild ~ Año) Aggregation requires fun.aggregate: length used as default > y[1:10,,"gui4a",1:2] , , Año = 2003 Rep Site...
2005 Jul 26
3
Melting TDM card
Yesterday FedEx brought me my new TDM400P with 4 FXS modules. I installed it (in the correct type PCI slot) , plugged in the power, and fired up the system. A few minutes later everyone in the office is complaining about something burning. I open the server again, and the top of the Digium card is black, slightly deformed, and looks and smells of melted plastic. The funny thing is.the card
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