similar to: Help on reshape2 data frame rearrangement

Displaying 20 results from an estimated 100 matches similar to: "Help on reshape2 data frame rearrangement"

2009 Jul 28
4
How to do poisson distribution test like this?
Dear R-listers, I want to reperfrom a poisson distribution test that presented in a recent-published biological research paper (Plant Physiology 2008, vol 148, pp. 1189-1200). That test is about the occurrence number of a kind of gene in separate chromosomes. For instance: The observed gene number in chromosome A is 36. The expected gene number in chromosome A is 30. Then, the authors got a
2011 Aug 07
1
Anyone free to take a data format question for Reshape2?
I need to reformat long data into a wide format (matrix for another program) but it does not seem straight forward. Can not seem to get it to work since some data elements are strings. Anyone have time to look at the issue? Tnx Bruce -- Bruce W. Miller, Ph.D. Conservation Ecologist Neotropical Bat Project office details Gallon Jug, Belize Mailing address P.O. Box 37, Belize City Belize,
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
2013 Jun 05
1
reshape2 issue solved Tnx!
Hi again all, As the original code lines I had dated back to 2007 that may have predated reshape2? In any case the use of *dcast *rather than /*cast*/ solved the issue. Then with 3 steps: Stop read Think I saw I just needed to change the line input.cast <- cast(input.melt, Species ~ *Date*, fun.aggregate = sum) to input.cast <- cast(input.melt, Species ~ *Time*, fun.aggregate = sum)
2017 Jun 04
0
Warning from reshape2 when melting a data frame with uneven number of columns.
I am not really sure what the warning means but I think your underlying problem is that all your variables are factors. Did you intend the values in each variable to be character? data.frame':??? 3 obs. of? 5 variables: ?$ V1: Factor w/ 3 levels "Name1","Name2",..: 1 2 3 ?$ V2: Factor w/ 3 levels "nam1","name-1",..: 1 3 2 ?$ V3: Factor w/ 3 levels
2010 Sep 10
0
reshape2: a reboot of the reshape package
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,
2010 Sep 10
0
reshape2: a reboot of the reshape package
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,
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,
2012 May 07
1
Missing Vignettes for reshape2
Running 2.15.0 on Slackware-13.1 with all packages in /usr/lib/R/library. Package reshape2 is in the library but there are no vignettes seen by R. If this is the result of something I did incorrectly, please point out how to install the vignettes with the package. I can get help for melt and cast but no reference on how to access the vignettes. Pointer appreciated, Rich
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
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
2017 Jun 04
0
Warning from reshape2 when melting a data frame with uneven number of columns.
Is this the solution? > d1<- as.data.frame(lapply(data,as.character),stringsAsFactors=FALSE) > str(d1) 'data.frame': 3 obs. of 5 variables: $ V1: chr "Name1" "Name2" "Name3" $ V2: chr "nam1" "name_12" "name-1" $ V3: chr "nam2" "nam_34" "name-2" $ V4: chr "nam3"
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 Dec 03
2
Excluding all missing values with dcast ("reshape2" package)
Hello--I'm doing a simple crosstab using dcast: rawfreq <- dcast(nh11brfs, race3~CHCCOPD, length) with the results race3 Yes No NA 1 White non-Hispanic 446 5473 21 2 Other non-Hispanic 29 211 0 3 Hispanic 6 81 1 4 <NA> 10 83 1 How would I modify this call to exclude all missing values; that is, to obtain race3
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
2014 May 22
2
reshape2
Te agradezco mucho Javier por tu mensaje, sobre el tema de referencia, solamente que al poner la instrucción library dataset, el sistema responde Error in library(dataset) : there is no package called ‘dataset’. Lo anterior sucede tanto con R 3.0.3 como con R 3.1.0 pero además al entrar a los directorios, encuentro que en los dos casos sí existen las carpetas library y dentro de éstas también
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
2010 Oct 04
3
can't find and install reshape2??
Hi everyone, I’m trying to install reshape2. But when I click on “install package” it’s not coming up!?!?! I’m getting reshape, but no reshape2? I’ve also tried download.packages(reshape2, destdir="c:\\") & download.packages(Reshape2, destdir="c:\\")…but no luck!!! Does anyone have any ideas what could be going on? Chris Howden Founding Partner Tricky
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