similar to: (PR#9666) 'aggregate' should preserve level ordering of

Displaying 20 results from an estimated 10000 matches similar to: "(PR#9666) 'aggregate' should preserve level ordering of"

2007 May 08
0
'aggregate' should preserve level ordering of factors (PR#9666)
Full_Name: Lutz Prechelt Version: 2.4.1 OS: Windows XP Submission from: (NULL) (160.45.111.67) aggregate (from package stats) should preserve the ordering of levels of factors it works on and also their 'ordered' attribute if present. But it does not. Here is an example: ff =
2007 Mar 29
0
(PR#9589) 'union' does not handle factors while 'intersect'
This is not a bug, nor is the subject line true: both do accept factors but what they do with factors is undocumented. From the help (not 'man') page Performs *set* union, intersection, (asymmetric!) difference, equality and membership on two vectors. ^^^^^^^ so it is not said to work on factors. I disagree that what intersect() for
2007 Mar 21
1
rbind.data.frame reacts on levels without factor (PR#9578)
Full_Name: Lutz Prechelt Version: 2.4.1 OS: Windows XP Submission from: (NULL) (160.45.111.67) I stack a number of data.frames using rbind. Each of these dataframes has a column 'authorname', which is a factor and a column author = unclass(authorname) as piecewise pseudonyms. When using rbind to stack these dataframes, R warns about invalid factor levels and inserts all NAs in the author
2007 Mar 29
0
(PR#9578) rbind.data.frame reacts on levels without
In your data frames, 'y' is a category and the following comment in the code makes clear this is deliberate. if( !is.null(levels(xj)) ) { all.levs[[j]] <- levels(xj) facCol[j] <- TRUE # turn categories into factors } else facCol[j] <- is.factor(xj) The behaviour is compatible with S apart from the comment in the R help
2007 Dec 16
2
question about the aggregate function with respect to order of levels of grouping elements
Hi, I am using aggregate() to add up groups of data according to year and month. It seems that the function aggregate() automatically sorts the levels of factors of the grouping elements, even if the order of the levels of factors is supplied. I am wondering if this is a bug, or if I missed something important. Below is an example that shows what I mean. Does anyone know if this is just the way
2006 May 18
1
R CMD check: checking examples: how to (not) pause execution
Hello all, trying to prepare my first package for submission to CRAN I am stumbling over the "checking examples" step of R CMD check. I have some examples that produce more than one plot. I currently separate those plot calls by readline("Press <Return> for a plot including a density plot") or some such to have R wait before producing the next plot. This works OK
2006 May 18
1
Trellis equivalent of par(ask=TRUE)?
(was: AW: [Rd] R CMD check: checking examples: how to (not) pause execution) Paul, Brian, > > I think the more usual way to solve this is to have the user set > > par(ask=TRUE) is they want to be prompted. thank you. Looking back, 'par' would have been a likely candidate for looking. One reason I did NOT look there is that I need the functionality for print.trellis in
2004 Aug 31
7
blockwise sums
I am looking for a function like my.blockwisesum(vector, n) that computes sums of disjoint subsequences of length n from vector and can work with vector lengths that are not a multiple of n. It should give me for instance my.blockwisesum(1:10, 3) == c(6, 15, 24, 10) Is there a builtin function that can do this? One could do it by coercing the vector into a matrix of width n, and then use
2006 Apr 21
1
plot.default 'ylim' error message is wrong (PR#8784)
Full_Name: Lutz Prechelt Version: 2.2.1 OS: WinXP SP2 Submission from: (NULL) (130.133.8.114) This command plot(0, 0, xlim=c(3, 5), ylim=c(0, 10, 17)) should complain about 'ylim' (because it has three elements). However, it does in fact (in my german error message at least) complain about 'xlim' instead: Fehler in plot.window(xlim, ylim, log, asp, ...) : ung?ltiger
2006 May 18
1
R CMD check: "T used instead of TRUE"
Hello everybody, I am just trying to put together my first own CRAN-able package. I have completed the programming and my code works OK. But now when I perform R CMD check agsemisc_1.0-2.tar.gz and R gets to the step * checking examples ... I receive the following error message: > print(bwplot(Species~Sepal.Length, data=iris, panel=panel.bwstrip)) Error in rep(T, length(x)) : T used
2004 Apr 28
1
Extracting numbers from somewhere within strings
Hello everybody, I have a bunch of strings like this: "IBM POWER4+ 1.9GHz" "IBM RS64-III 500MHz" "IBM RS64-IV 600 MHz" "IBM RS64 IV 750MHz" "Intel Itanium 2 Processor 6M 1.5GHz" "Intel Itanium2 1 Ghz" "Intel Itanium2 1.5GHz" "Intel
2004 May 03
2
Lattice: finding out xlim within panel function
Dear Lattice bit-meddlers, while within a panel function for xyplot, how can I find out the values of (effectively) xlim and ylim -- no matter whether they have been set explicitly or chosen by Lattice itself? I have just tried for an hour to find out, with no success whatsoever. I looked in Grid for something that would return such data, but got lost. I looked at tracebacks of panel calls,
2004 Mar 16
3
Terminology and canonical statistical user literature
Brian Ripley wrote (to somebody asking about "effect sizes"): > ... > Given that, I wonder if you are used to standard terminology. Good point. But I think for many of us there is more behind that. I personally belong to an (apparently fairly large) group of R users who may be enthusiastic, but are statistical laymen due to a lack of formal education in the area. The
1999 Aug 23
1
Strange 'Unimplemented feature in rep' error (PR#254)
I have a large computation that performs various bootstrap resampling loops over pairs of samples using lapply(). After a few seconds it stops like this > do.summarize.effects(compute.power=T) ... Error: Unimplemented feature in rep > .Traceback [[1]] [1] "rep(no, length = length(ans))" [[2]] [1] "ifelse(t.howto == \"n\", boot.result, l.meanboot.test(onew.x,
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.
2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion I think my problem may also only occur when the left hand side of the formula is cbind(...) Here is example code that generates a dataset and then the error. The first function "agg2" fails > agg2(FALSE) do agg 2 Error in m[[2L]][[2L]] : object
2007 Jul 31
1
A complicated 'aggregate'
Hi, I have a financial (zoo) time series with prices and volumes (although I can get the coredata as a matrix). Due to the data-source some indices have multiple observations. I want to aggregate these according to a weighted average. 11:00:01 34 1000 11:00:01 35 500 11:00:01 35 1000 11:00:02 34 500 11:00:02 35 500 should become 11:00:01 34.6 2500 11:00:02 34.5 1000 I currently do this
2010 Feb 17
2
Is the aggregate function the best way to do this?
Hi, I''m having a dataframe ''Subset1'' with a number of factor variables and 160 numerical variables Now I want to make sums for all rows that have the same values for the different factor variables, except for the factor variables: VAR1,VAR2,VAR3 who may have the same values. With the formula given below this works great, but in a situation with 15000 rows and 13
2012 May 08
2
How to deal with a dataframe within a dataframe?
Hello all, I am doing an aggregation where the aggregating function returns not a single numeric value but a vector of two elements using return(c(val1, val2)). I don't know how to access the individual columns of that vector in the resulting dataframe though. How is this done correctly? Thanks, robert > agg <- aggregate(formula=df$value ~ df$quarter + df$tool, + FUN=cp.cpk,
2006 Sep 21
1
transforming factor back to numbers
Hi I generate a new dataframe by doing: npl.agg <- aggregate(npl$DensPlants, list(year=npl$year, sim=npl$sim), mean, na.rm=TRUE ) Now I want to plot it by using coplot(npl.agg$x ~ npl.agg$year | npl.agg$sim, type="l") but, as npl.agg$year is seen as a factor, the order of the points on the x-axis (time axis) does not follow the numerical sorting 1...100, but rather the text