Displaying 20 results from an estimated 3000 matches similar to: "reshape2: a reboot of the reshape package"
2011 Jan 04
0
reshape2 1.1
Reshape2 is a reboot of the reshape package. It's been over five years
since the first release of the package, and in that time I've learned
a tremendous amount about R programming, and how to work with data in
R. Reshape2 uses that knowledge to make a new package for reshaping
data that is much more focussed and much much faster.
This version improves speed at the cost of functionality,
2011 Jan 04
0
reshape2 1.1
Reshape2 is a reboot of the reshape package. It's been over five years
since the first release of the package, and in that time I've learned
a tremendous amount about R programming, and how to work with data in
R. Reshape2 uses that knowledge to make a new package for reshaping
data that is much more focussed and much much faster.
This version improves speed at the cost of functionality,
2013 Jun 26
1
Margins in dcast (reshape2)
Hi,
I'd like to get mean values for the margins of my casted data.frame.
For the casting I am using dcast() from reshape2. However, when I set
the margins parameter (margins=c("grand\_row")) I get following error
concerning
an unrecognized escape character '\_'. So what is the correct command
to get the outermost margins only in reshape2?
/johannes
[[alternative HTML
2011 Feb 26
1
Transform a dataset from long to wide using reshape2
I seem to be running into the same problem reported in
https://stat.ethz.ch/pipermail/r-help/2010-November/258265.html
I cannot seem to transform a dataset from long to wide using reshape2.
Clearly I am missing something very simple but a look at the manual and the reshape paper in JSS does not suggest anything.
Any advice would be welcome
===========================load
2012 Jul 24
3
Simple reshape problem I am completely missing
I seem to be doing something really stupid or missing something really obvious but what?
I have a simple three column data.frame that I would like to reshape to wide preferably using reshape2.
An example from http://stackoverflow.com/questions/9617348/reshape-three-column-data-frame-to-matrix looked perfect except I wanted a data frame but it seemed okay. I just changed acast to dcast and it
2010 Nov 01
2
transforming a dataset for association analysis RESHAPE2
I get the following message when using the reshape2 package line
> tDat.m<- melt(Dataset)
Using Item, Subject as id variables
> tDatCast<- acast(tDat.m,Subject~Item)
Aggregation function missing: defaulting to length
Note Problem Statement-
convert dataframe
Subject Item Score
1 Subject 1 Item 1 1
2 Subject 1 Item 2 0
3 Subject 1 Item 3 1
4 Subject 2 Item 1 1
5
2017 Jul 03
0
reshaping the data
Hi
Do you want something like
dcast(test, Sample~Gene, fun=function(x) paste(x, collapse=","))
or
dcast(test, Sample~Gene, fun=function(x) sum(as.numeric(x)))
1 means INDEL, 2 means SNV and three means both
Cheers
Petr
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Bogdan
> Tanasa
> Sent: Monday, July 3, 2017 9:22 AM
2004 Feb 04
0
Job opportunity
I'm pleased to announce that my employer, Becton Dickinson, has an open
position for software implementation in the Matlab and S languages. If
interested, send a cover letter and resume (or CV) to Dr. Richard Moore at
richard_moore at bd.com. If you have questions, contact myself (at
jim_garrett at bd.com) or Dr. Moore.
Below find a position description.
Jim Garrett
Becton Dickinson
2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the
order of the rows is not determined. Your answer could be
1957 1958 ... 1985 1986
0.8625000 0.7500000 ... 0.7307692 0.23750000
0.0733945 0.6435644 ... NA 0.05769231
0.5096154 NA ... NA 0.65137615
or
1957 1958 ... 1985 1986
0.0733945 0.6435644 ... NA
2010 Sep 10
0
plyr: version 1.2
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations
2010 Sep 10
0
plyr: version 1.2
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations
2017 Jul 05
1
Help with reshape/reshape2 needed
Hi Tom,
Or perhaps:
#assume the data frame is named "tadf"
library(prettyR)
stretch_df(tadf,1,2)
Jim
On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote:
> The reason it doesn't work easily with reshape/reshape2 is that the
> order of the rows is not determined. Your answer could be
>
> 1957 1958 ... 1985 1986
>
2011 Aug 08
1
Reshape2 sytax
Hi Hadley et all,
I am struggling with reshape2 and melt works and melt_check
(filtered151) seems fine
My cast command was acast (filtered151, Time ~ Species ~ Number)
> melt_check (filtered151)
Using time, Species as id variables
$id
[1] "time" "Species"
$measure
[1] "Number"
When I execute cast the data matrix is in the correct order but the data
2010 Sep 13
1
Problems with reshape2 on Mac
Hi!
I updated to reshape2 yesterday and tried to make it work. Unfortunately, it mainly throws error messages at me (good thing it's reshape2 1.0 and not reshape 2.0). The most recent is:
Error in match.fun(FUN) : object 'id' not found
When I manually create an object 'id', it says:
Error in get(as.character(FUN), mode = "function", envir = envir) :
object
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
2017 Jul 03
3
reshaping the data
Dear all,
I would appreciate please a piece of help regarding the use of acast/dcast
functions in reshape2 package.
Specifically, I'm working with a data frame, that has information about
SAMPLE, GENE, and TYPE of MUTATION (as shown below):
Sample Gene Type
22M AEBP1 SNV
17M AEBP1 SNV
22M ATR INDEL
22M ATR SNV
11M BTK SNV
11M BTK
2011 Dec 23
2
cast in reshape and reshape2
> library(reshape2)
> x = melt(airquality, id=c('month', 'day'))
With reshape I can cast with multiple functions:
> library(reshape)
> cast(x, month+variable~., c(mean,sd))
month variable mean sd
1 5 ozone 23.615385 22.224449
2 5 solar.r 181.296296 115.075499
3 5 wind 11.622581 3.531450
4 5 temp 65.548387
2013 Feb 03
1
problem in installing reshape2 (urgent)
Dear R users,
In order to install reshape2 package, I gave the following command:
install.packages("reshape2",dep=TRUE)
However, it is not getting installed.
The message that I am getting is:
Warning: dependencies ‘plyr’, ‘stringr’, ‘testthat’ are not available
trying URL '
http://ftp.ctex.org/mirrors/CRAN/src/contrib/reshape2_1.2.2.tar.gz'
Content type
2017 Jul 05
0
Help with reshape/reshape2 needed
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data:
> Y <- split(X[, 2], X[, 1])
> vals <- sapply(Y, length)
> pad <- max(vals) - vals
> Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x])))
> names(Y2) <- names(Y)
> X2 <- do.call(cbind, Y2)
> X2[, 1:6]
1957 1958 1959
2012 Jul 05
1
reshape2 errors on data frame
I've successfully reformatted data frames from long to wide with reshape2,
but this time I'm getting errors that I want to understand and resolve.
Here's the data frame structure and the results of the melt() and dcast()
functions:
str(waterchem)
'data.frame': 128412 obs. of 8 variables:
$ site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1