similar to: tapply help

Displaying 20 results from an estimated 5000 matches similar to: "tapply help"

2005 Feb 16
4
festival text for weather report
http://www.srh.noaa.gov/fwd/productviewnation.php?pil=OKXZFPOKX&version= 0 can anyone suggest how I could set up asterisk@home to read out allowed the following text when I dial extension 850? 815 PM EST WED FEB 16 2005 .OVERNIGHT...MOSTLY CLEAR. LOWS 30 TO 35. NORTHWEST WINDS 15 TO 20 MPH WITH GUSTS UP TO 30 MPH...DIMINISHING TO 10 TO 15 MPH LATE. .THURSDAY...PARTLY CLOUDY. COOLER
2010 Jul 21
1
Lattice Panel Print Order
Hi, I have done a bit of searching and have not found a good answer for my question. Although I have not difficulty ordering the panels, Lattice prints them from bottom to top and left to right for each page. Is it possible to make it print from top to bottom for each page? I've tinkered with index.cond and tried reordering the panels, but I don't see a way to do it on a page by page
2009 Jun 23
1
ask for help xyplot
I want to make such plot using the following data set plot Mean with Sd(+/-) by Dim group by Lac here is data Does anyone know how to plot using xyploy Thanks, Aimin Mean Sd Var Min Max Dim Lac 704 44.00000 NA NA 44.0 44.0 -30 3 703 45.92000 9.5484030 91.1720000 60.0 34.4 -30 4 702 57.40000 NA NA 57.4 57.4 -30
2012 Apr 03
1
Imputing missing values using "LSmeans" (i.e., population marginal means) - advice in R?
Hi folks, I have a dataset that consists of counts over a ~30 year period at multiple (>200) sites. Only one count is conducted at each site in each year; however, not all sites are surveyed in all years. I need to impute the missing values because I need an estimate of the total population size (i.e., sum of counts across all sites) in each year as input to another model. >
2010 Sep 15
3
aggregate, by, *apply
Dear R gurus, I regularly come across a situation where I would like to apply a function to a subset of data in a dataframe, but I have not found an R function to facilitate exactly what I need. More specifically, I'd like my function to have a context of where the data it's analyzing came from. Here is an example: ### BEGIN ### func<-function(x){ m<-median(x$x) if(m > 2 &
2006 Apr 27
2
as.factor: changed behaviour for Date class
Dear all, I have noticed a little change in the behaviour of as.factor from R-2.2.1 to R-2.3.0, and can't find it in the NEWS. In R-2.3.0: > times <- 1:5 > class(times) <- "Date" > as.factor(times) [1] 1 2 3 4 5 Levels: 1 2 3 4 5 In R-2.2.1: > as.factor(times) [1] 1970-01-02 1970-01-03 1970-01-04 1970-01-05 1970-01-06 Levels: 1970-01-02 1970-01-03 1970-01-04
2006 Apr 27
2
as.factor: changed behaviour for Date class
Dear all, I have noticed a little change in the behaviour of as.factor from R-2.2.1 to R-2.3.0, and can't find it in the NEWS. In R-2.3.0: > times <- 1:5 > class(times) <- "Date" > as.factor(times) [1] 1 2 3 4 5 Levels: 1 2 3 4 5 In R-2.2.1: > as.factor(times) [1] 1970-01-02 1970-01-03 1970-01-04 1970-01-05 1970-01-06 Levels: 1970-01-02 1970-01-03 1970-01-04
2009 Mar 27
1
first time poster
hi, so, please bear with me as I am new to the wonderful world of computers... i am trying to answer the following question, and having no luck: Focus your analysis on a comparison between respondents labeled ?Low? (coded 1) on attend4 and respondents labeled ?High? (coded 4). Then, examine the variance of distributions. That is, run a command "var.test". I feel like I need to recode
2011 May 21
1
'apply' with additional class variable
Dear R gurus, I'm trying to solve what I assume is a fairly simple problem, but I'm having trouble finding the proper approach. I have a matrix where each column is some object (e.g. a car) and each row is a numeric measurement of a feature of said object (e.g. horse power, top speed, etc.). Let's also suppose that I know what make the car is (e.g. toyota, ford, etc.), stored in a
2008 Jul 08
0
Fwd: Re: extracting index list when using tapply()
The following message is provided by Erik Please provide the reproducible code to do this. Generate a sample data set using the random data generating functions and show us what you'd like, we can then more easily help. ctu at bigred.unl.edu wrote: > Hi, > How about using "subset"? > x1<-tapply(subset(years, length(area)>20), function(x) length(unique(x))) >
2017 Jan 26
0
RFC: tapply(*, ..., init.value = NA)
It would be cool if the default for tapply's init.value could be FUN(X[0]), so it would be 0 for FUN=sum or FUN=length, TRUE for FUN=all, -Inf for FUN=max, etc. But that would take time and would break code for which FUN did not work on length-0 objects. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Jan 26, 2017 at 2:42 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
2007 Jun 18
1
getting tapply() to work across multiple columns
I have the following data.frame: index <- c("a","a","b","b","b") alpha <- c(1,2,3,4,5) beta <- c(2,3,4,5,6) table <-data.frame(index,alpha,beta) I'm now interested in getting means of alpha and beta for each of the index values and do a tapply() for each of the columns, e.g. means.alpha <- tapply(table$alpha, index,mean)
2008 Jul 08
1
split.Date
Hello, I wanted to suggest that the below method for split.Date be added to the base library to significantly speed up splits with values of class Date. In the below example I show a speed improvement of 175x for 1000 data points. On a vector of size 1e6, the time difference was 22 minutes for split.default versus 0.3 seconds for the split.Date function below (!). Note that this improvement will
2004 May 13
2
tapply & hist
I'm learning how to use tapply. Now I'm having a go at the following code in which dati contains almost 600 lines, Pot - numeric - are the capacities of power plants and SGruppo - text - the corresponding six technologies ("CCC", "CIC","TGC", "CSC","CPC", "TE"). .....................................................
1999 Feb 19
1
Potential problem with tapply
Is the following behaviour of tapply not disappointing? Problem with tapply occurs when dealing with na.rm when an argument additional to na.rm is sent to the applied function (here quantile). Any comment? Thank you, Philippe Lambert > x <- c(12,10,12,2,4,11,3,7,2,1,18,7,NA,NA,7,5) > fac <- gl(4,4,16) > # Works fine > tapply(x,fac,quantile,na.rm=T) $"1" 0% 25%
2010 Feb 02
3
tapply for function taking of >1 argument?
I'm sure I can put this together from the various 'apply's and split, but I wonder if anyone has a quick incantation: E.g. I can do tapply( data, groups, mean) but how can I do something like: tapply( list(data,weights), groups, weighted.mean ) ? (or: mapply is to sapply as ? is to tapply ) Thanks for your help. -- View this message in context:
2011 Aug 04
3
source() or OS X Lion?
Dear R Gurus, I'm seeing some strange behavior that I can't explain. I'm generating a figure for a paper and I like to save the script (no matter how simple) for future reference. My practice is to write the script and run it using the 'source()' function. What's weird is that the resultant figure is not readable by OS X 10.7.0 (Lion). While trying to figure out what I did
2008 Nov 14
1
# values used in a function in tapply
Hello, I am using tapply to pull out data by the day of week and then perform functions (e.g. mean). I would like to have the number of values used for the calcuation for the functions, sorted by each day of week. A number of entries in any given column are NAs. I have tried the following code and simple variants with no luck. for (i in 1:length(a[1,])){ x<-tapply(a[,i],a[,1],mean,
2012 Sep 03
1
Scatter plot from tapply output, labels of data
Hei, i am trying to plot the means of two variables (d13C and d15N), by 2 grouping factors (Species and Year) that i obtained by the function tapply. I would like to plot with different colours according to the Year and show the "Species" as data labels. My data looks like this: Species d13C d13N Year "Species1" 14,4 11.5 2009 "Species2"
2009 Dec 01
1
Remark on tapply().
Consider the following: > set.seed(42) > ff <- factor(sample(c(1,3,5),42,TRUE),levels=1:5) > x <- runif(42) > tapply(x,ff,sum) 1 2 3 4 5 3.675436 NA 7.519675 NA 9.094210 I got bitten by those NAs in the result of tapply(). Effectively one is summing over the empty set, and consequently (according to what I learned as a child)