similar to: Aggregate factor names

Displaying 20 results from an estimated 3000 matches similar to: "Aggregate factor names"

2007 Jul 13
2
Suggestion to extend aggregate() to return multiple and/or named values
Hi all, This is my first post to the developers list. As I understand it, aggregate() currently repeats a function across cells in a dataframe but is only able to handle functions with single value returns. Aggregate() also lacks the ability to retain the names given to the returned value. I've created an agg() function (pasted below) that is apparently backwards compatible (i.e.
2007 Oct 01
3
optimize() stuck in local plateau ?
Hi all, Consider the following function: #### my.func = function(x){ y=ifelse(x>-.5,0,ifelse(x< -.8,abs(x)/2,abs(x))) print(c(x,y)) #print what was tested and what the result is return(y) } curve(my.func,from=-1,1) #### When I attempt to find the maximum of this function, which should be -.8, I find that optimize gets stuck in the plateau area and doesn't bother testing the
2007 Aug 08
3
SWF animation method
Hi all, Just thought I'd share something I discovered last night. I was interested in creating animations consisting of a series of plots and after finding very little in the usual sources regarding animation in R directly, and disliking the imagemagick method described here (http://tolstoy.newcastle.edu.au/R/help/05/10/13297.html), I discovered that if one exports the plots to a
2008 Aug 25
1
Output to Latex using Memisc almost works
Hello, I'm using memisc to output regression results to tables and latex. My problem is that the output that Latex needs must be in between $ $ so that it is read as formula but memisc does not output the result between $ $. For example, latex needs: $0.05^{***}$ and memisc outputs 0.05^{***} in an entry. I am new to Latex and I imagine it could also be a latex 'problem' and not
2008 Mar 02
1
regression output to latex
hello everybody i was seeking a converter beetween R regression output (eg with summary) and the conventional way to present regression output in paper: every model as a vertical vector with \beta, t beetween parenthesis below the first, and other statistics (R^2 etc) . I've seen hmisc and xtable, and if I didn't miss something, they don't include something like that. Thank you
2013 Mar 15
5
Data manipulation
Hello all, I would appreciate your thoughts on a seemingly simple problem. I have a database, where each row represent a single record. I want to aggregate this database so I use the aggregate command : D<-read.csv("C:\\Users\\test.csv") attach(D) by1<-factor(Class) by2<-factor(X) W<-aggregate(x=Count,by=list(by1,by2),FUN="sum") The results I
2007 Jun 26
2
Power calculation with measurement error
Hi all, Hopefully this will be quick, I'm looking for pointers to packages/ functions that would allow me to calculate the power of a t.test when the DV has measurement error. That is, I understand that, ceteris paribus, experiments using measure with more error (lower reliability) will have lower power. Mike -- Mike Lawrence Graduate Student, Department of Psychology, Dalhousie
2008 Nov 24
2
how to read .sps (SPSS file extension)?
Hi everyone, I'm trying to import .sps (SPSS portable file) file. the read.spss function (library foreign) doesn't allow to import such files. should I import in spss and then save as sav file? there is not other solutions available? what I mostly like from spss file is that they have variable labels. want is really wish to keep are the variable.labels from the spss file; so, if there is a
2007 Sep 17
1
Create correlated data with skew
Hi all, I understand that it is simple to create data with a specific correlation (say, .5) using mvrnorm from the MASS library: > library(MASS) > set.seed(1) > > a=mvrnorm( + n=10 + ,mu=rep(0,2) + ,Sigma=matrix(c(1,.5,.5,1),2,2) + ,empirical=T + ) > a [,1] [,2] [1,] -1.0008380 -1.233467875 [2,] -0.1588633 -0.003410001 [3,] 1.2054727 -0.620558768
2004 Aug 15
3
Stacking Vectors/Dataframes
Hello, Is there a simple way of stacking/merging two dataframes in R? I want to stack them piece-wise, not simply add one whole dataframe to the bottom of the other. I want to create as follows: x.frame: aX1 bX1 cX1 ... zX1 aX2 bX2 cX2 ... zX2 ... ... ... ... ... aX99 bX99 cX99 ... zX99 y.frame: aY1 bY1 cY1 ... zY1 aY2 bY2 cY2 ... zY2 ... ... ... ... ... aY99 bY99 cY99 ...
2008 Feb 21
2
Problems with aggregate
Hello list, I'm new to this list, so please forgive my ignorance. I have searched R-help for some hints into what might be my problem, but I truly have no idea where to go from here. I have an object of approximately 15,000 rows and 2 columns. There are many duplicates in the first column, all with different corresponding values in the second column. For example (2 is duplicated):
2008 May 09
1
lme() with two random effects
Hi all, I have collected response time data from 178 participants ('sub') for each combination of 4 within-Ss factors ('con','int','tone','cue'). Additionally, I have recorded the gender of each participant, so this forms a between-Ss factor ('gender'). Normally this would be analyzed using aov:
2009 Feb 07
3
New package test results available
We've added a column at http://cran.r-project.org/web/checks/check_summary.html of test results using the Sun Studio compiler: it is intended that these will be updated weekly. The Sun Studio compiler is that used on Solaris: these runs were on the Linux version. All the other platforms are using gcc 4, so this provides an opportunity for checking for use of gcc-specific features and
2007 Jun 20
2
how to create cumulative histogram from two independent variables?
Hi all, I am extremely newbie to R. Can anybody jump-start me with any clues as to how do I get a cumulative histogram from two independent variables, cumhist(X,Y) ? -jose [[alternative HTML version deleted]]
2007 Jun 22
1
connecting to running process possible?
Hello, i'm trying to find a more modern system to reproduce the functionality that was available through the Histoscope program (from Fermilab). Namely, the capability of connecting to a running process and having plots update in realtime in response to new data. Is this possible with R? Thank you, Charles Cosse [[alternative HTML version deleted]]
2007 May 24
2
Calculation of ratio distribution properties
Hi all, Looking to calculate the expected mean and variance of a ratio distribution where the source distributions are gaussian with known parameters and sample values are correlated. I see (from wikipedia: http://en.wikipedia.org/wiki/ Ratio_distribution#Gaussian_ratio_distribution) that this calculation is quite involved, so I'm hoping that someone has already coded a function to
2014 Mar 19
2
Posible error en la documentación de "aggregate"
Hola compañeros, estaba utilizando la función "aggregate" y quería que tuviese en cuenta los NAs. He leido la documentación de dicha función y aparece esto: # and if you want to treat NAs as a group fby1 <- factor(by1, exclude = "") fby2 <- factor(by2, exclude = "") aggregate(x = testDF, by = list(fby1, fby2), FUN = "mean")
2007 Jun 26
3
surprising difference in log()
Hello everybody My collegue and I noticed a strange behaviour of R on different platforms. It's a simple computation, but results are rather different. On Windows XP: > floor(log(8,2)) [1] 3 which is what one should expect. Here's instead the result with Mac OS X (same version, 2.5.0 (2007-04-23)) > floor(log(8,2)) [1] 2 Is it a "bug" in R or in the operating
2002 May 03
2
merge (PR#1510)
Full_Name: Martin Elff Version: 1.5.0 OS: MS Windows 98 Submission from: (NULL) (134.155.91.46) Merging of two data frames by variables with different names (using by.x and by.y) is no longer possible (it was possible in version 1.4.1). Call: mvoteint.classd.matadd <- merge( unique(mvoteint.classd), unique(subset(dimens.mpp,
2007 Jul 26
2
logistic regression
Greetings, I am working on a logistic regression model in R and I am struggling with the code, as it is a relatively new program for me. In searching Google for 'logistic regression diagnostics' I came Elizabeth Brown's Lecture 14 from her Winter 2004 Biostatistics 515 course (http://courses.washington.edu/b515/l14.pdf) . I found most of the code to be very helpful, but I am