similar to: Can't get the correct order from melt.data.frame of reshape library.

Displaying 20 results from an estimated 500 matches similar to: "Can't get the correct order from melt.data.frame of reshape library."

2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a multinomial logit model with covariates. Further details on this technique and examples with several
2008 Oct 28
3
Dose Profile
Hi Everyone, I have data in a long format e.g. there is one row per patient but each follow-up appointment is included in the row. So, a snippet of the data looks like this: TrialNo Drug Sex Rand Adate1 Date1 Dose1 Time1 Adate2 Date2 Dose2 Time2 B1001029 LTG M 15719 30/04/2003 15825 150 106 29/08/2003 15946 200 227 B1117003 LTG M 15734 30/04/2003 15825 200 91 03/09/2003 15951 250 217
2007 Aug 14
1
glm(family=binomial) and lmer
Dear R users, I've notice that there are two ways to conduct a binomial GLM with binomial counts using R. The first way is outlined by Michael Crawley in his "Statistical Computing book" (p 520-521): >dose=c(1,3,10,30,100) >dead = c(2,10,40,96,98) >batch=c(100,90,98,100,100) >response = cbind(dead,batch-dead) >model1=glm(y~log(dose),binomial)
2010 Dec 30
1
Different results in glm() probit model using vector vs. two-column matrix response
Hi - I am fitting a probit model using glm(), and the deviance and residual degrees of freedom are different depending on whether I use a binary response vector of length 80 or a two-column matrix response (10 rows) with the number of success and failures in each column. I would think that these would be just two different ways of specifying the same model, but this does not appear to be the case.
2012 Dec 29
0
shell function in R
Hi Everyone: I am running NONMEM from R using following command. shell("nmfe72 TOT_EST_DOSE2.CTL DOSE2.OUT",wait=T) This command runs NONMEM successfully but does not show the progress. Usually, intermediate outputs are displayed on CMD console when this same command is run from CMD console. How can I view the intermediate outputs while running NONMEM from R?
2012 Mar 19
0
Reshape data frame with dcast and melt
Hello, I implemented two functions reshape_long and reshape_wide (see full working example below) to reshape data frames. I created several small examples and the two functions seemed to work properly. However, using the reshape_wide function on my real data sets (about 200.000 to 300.000 rows) failed. What happens is set all values for X, Y and Z were set to 1. The structure of my real data
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] <-
2007 Nov 28
1
ggplot2 melt function "value"
Hi:I recently started using the melt function and found that it is very useful and powerful,however I can't seem to find the way to change the default column header "value" to my custom column name. Does anyone know how to go about this? any suggestions are very appreciated. Thanks Felipe D. Carrillo Fishery Biologist US Fish & Wildlife Service California, USA
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
2009 Mar 31
1
Reshape: 'melt' numerous objects
Dear R Users, I'm trying to use the reshape package to 'melt' my gridded data into column format. I've done this before on individual files, but this time I'm trying to do it on a directory of files (with variable file names) - therefore I have to also use the 'assign' command. I have come up against a couple of problems however and am therefore seeking advice... >
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]]
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
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
2012 Mar 01
1
Need help using Melt and cast to compute correlation for a cross tabulation
I have a data frame with a number of observed and predicted values by classification as shown below: Count Volume FCLASS 1 55000 60000 Grade Separated 2 43000 39000 Grade Separated 3 26000 26500 Major Arterial 4 19500 20000 Major Arterial ... There are four classes here: Grade Separated, Major Arterial, Minor Arterial, and Collector I am looking
2010 May 25
2
help required to melt a data frame
I have the raw data with 9 column and 197977 row: > dummy State Months Bedroom 1 xxx Jan 1 2 xxx Jan 2 3 xxx Jan 1 4 yyy Jan 1 5 yyy Jan 2 6 yyy Jan 1 7 zzz Jan 3 8 zzz Jan 1 9 zzz Jan 2 10 xxx Feb 3 11 xxx Feb 4 12 xxx Feb 2 13 yyy Feb 1 14
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),
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
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
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