similar to: Can not melt data.frame

Displaying 20 results from an estimated 100 matches similar to: "Can not melt data.frame"

2011 Jul 01
2
Initiating in BNArray
Hi, I'm trying to understand some details about an example maintened in [1]. According that link, I have total.data as a data set (am I right?). But I don't understand how is built that table. I saved the dataset in a file, with dput(), and had something like this: structure(list(df.all = structure(list(V1 = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
2012 Jul 19
1
Truncating (rounding down) to nearest half hour.
I couldn't find anything in the chron or timeDate packages, and a good search yielded rounding to the nearest half hour, which I don't want. The data: structure(list(Date = structure(c(1209625080, 1209641460, 1209652500, 1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300, 1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580, 1209829920,
2012 Oct 17
3
aggregate function not working?
The aggregate function for some reason will now work for me. The error I'm getting is: "Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?" agPriceList=aggregate(PriceList$Size, list(PriceList$bandNum),sum) *Price list dataframe:* dput(PriceList) structure(list(Price = c(0, 8.18, 8.27, 10.42, 10.5, 10.6, 11.13,
2011 May 16
2
File to MYSQL
Dear R-user, I have to feed my database using some SQL commands. I have already read a data frame with the data I need but after that these data should be write in a file wtih SQL commands. 1) My dataframe: dput(Alldados) structure(list(Station_NO = c(836490, 836920, 836950, 836980, 837380, 837460), TMAX_2M = c("NULL", "NULL", "NULL", "NULL",
2008 Sep 26
2
Date Time conversion
what am I doing wrong? chron(as.character(f), format=c(dates="%m/%d/%y", times="%h:%m")) f <- structure(c(51L, 60L, 66L, 87L, 90L, 115L, 23L, 35L, 37L, 6L, 12L, 55L, 84L, 96L, 109L, 17L, 29L, 41L, 3L, 74L, 94L, 102L, 30L, 8L, 46L, 69L, 107L, 15L, 25L, 39L, 1L, 71L, 95L, 19L, 56L, 62L, 76L, 85L, 99L, 111L, 42L, 4L, 52L, 61L, 67L, 91L, 13L, 24L, 36L, 38L, 7L, 81L, 82L, 57L,
2013 Jun 30
0
Help: argument is not numeric or logical: returning NA
Hi, One problem with your example dataset is that you have 11 list elements with the last one having different dimensions.? I think it was based on `summarized`. Then, the second problem I encountered for testing is that the dataset you provided doesn't fulfill the criteria. lst1<- list(structure(list......) #output of dput ? lst2<- lst1[1:10] #deleted the last list element
2011 Mar 26
2
[LLVMdev] Possible missed optimization?
> > You can look at the output of -debug-only=regcoalescing to see what is > going on. > > This is the debug output i've got, some information is a bit cryptic for me so next is what i understood: ********** SIMPLE REGISTER COALESCING ********** ********** Function: foo ********** JOINING INTERVALS *********** entry: 16L %vreg0<def> = COPY %R25R24<kill>;
2012 Jul 17
1
Script help: Determining Time Difference between two data points.
I have the following data (a subset of the real data set): structure(list(Date = structure(c(1209625080, 1209641460, 1209652500, 1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300, 1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580, 1209829920, 1209837180, 1209848160, 1209854640, 1209859440, 1209870780, 1209887760, 1209901080, 1209921660, 1209929280,
2011 Nov 10
2
plotting a function with given formula in ggplot2
Hi All, I have a scatter plot produced using ggplot2 and I want to add the regression line to this scatter plot. I suppose I can use geom_smooth() to do this, but for the sake of learning ( I am new both to R and ggplot2), I want to try and add it as a function (something that curve() does in the standard R plotting). I did some search and found that stat_function() can be used for this. But
2013 Feb 27
2
matrix multiplication
Hi, Try this: #mat1 is the data res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1}))
2012 Feb 21
2
Dataframes in PLS package
I have been working with the pls procedure and have problems getting the procedure to work with matrix or frame data. I suspect the problem lies in my understanding of frames, but can't find anything in the documentation that will help. Here is what I have done: I read in an 10000 x 8 table of data, and assign the first four columns to matrix A and the second four to matrix B pls <-
2010 Apr 19
1
What is mclust up to? Different clusters found if x and y interchanged
Hello All... I gave a task to my students that involved using mclust to look for clusters in some bivariate data of isotopes vs various mining locations. They discovered something I didn?t expect; the data (called tur) is appended below. p <- qplot(x = dD, y = dCu65, data = tur, color = mine) print(p) # simple bivariate plot of the data; looks fine mod1 <- Mclust(tur[,2:3]) mod1$G mod2
2012 May 03
2
Help with readBin
I'm trying to read a binary file created by a fortran code using readBin and readChar. Everything reads fine (integers and strings) except for double precision numbers, they are read as huge or very small number (1E-250,...). I tried various endianness, swap, But nothing has worked so far. I also tried on R 64 bit for linux and windows (R 2.14) and R 2.11 on windows XP 32 bit. Any help would
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2011 Jan 19
1
Using subset to filter data table
I am having difficulty understanding how I would constrain a data set by filtering out 'records' based on certain criteria. Using SQL I could query using 'select * from my.data where LithClass in ('sand', 'clay')' or some such. Using subset, there seem to be ghosts left behind (that is, all of the LithClass *.Labels* remain after subset) > dput(tcc)
2009 Aug 07
1
ggplot2-ddply question
Hi all: I am trying to use the ddply function to estimate the mean of 'Total','Fry','Smolt' and 'Fry.Eq' columns without success. I have the dput of my dataset below. I wonder if someone can give me a hand with this function. # dput(winter) winter <-structure(list(IDDate = structure(c(37L, 48L, 59L, 62L, 63L, 64L, 65L, 66L, 67L, 38L, 39L, 40L, 41L, 42L, 43L,
2016 Apr 22
1
Unique Ordering
Hi R-Help, data at bottom I've been struggling with a problem where I need to order based on 1) the Frequency "Freq" and 2) keeping each group of 3 of the same type together "Var2" but I want across all groups it to go "high to low" based on the earn factor. Thank you! structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 2L, 3L, 1L,
2013 Apr 11
1
Dotchart per groups
Hi all, I would like to ask you for help. I did a dotplot - using dotchart function. There are two localites (loc) with values 75 or 56 in my data ZZ. The f column has 4 levels: P1, S1, S8, R6. The dataframe is ordered by N value, pchloc value is assign to use "pch" in plot. > head(ZZ) loc f N color ordered pchloc 98 75 S1 6.39 green 1 16 99 75 S8 6.44 blue
2011 Nov 08
2
nesting scale_manual caracteristics in ggplot
Hi there, I am having a little problem with combining three scale_manual commands in a facet plot. I am not able to combine the three different characteristics, instead ending up with three different descriptions next to the graph for the same geom. I would like to see two separate labels (not three); one describing lines 1-7 and the other 8-14. For each of the treatments (A-B) I want a
2011 Mar 28
0
[LLVMdev] Possible missed optimization?
On Mar 26, 2011, at 4:09 PM, Borja Ferrer wrote: > You can look at the output of -debug-only=regcoalescing to see what is going on. > > This is the debug output i've got, some information is a bit cryptic for me so next is what i understood: > > ********** SIMPLE REGISTER COALESCING ********** > ********** Function: foo > ********** JOINING INTERVALS *********** >