search for: aves

Displaying 20 results from an estimated 3342 matches for "aves".

Did you mean: ave
2009 Apr 09
2
numbers not behaving as expected
If someone can explain this odd behavior I'd appreciate it. I have a data.frame Cell.ave (attached and created via dput(Cell.ave, "Cell.ave") which contains three columns of parameters year, month and AveRain. I need to subset the data.frame by months such that DrySeaonMonths are 1,2,3,4, 11, and 12 or Jan - April, November and December and WetSeasonMonths are 5:10 or
2009 Apr 19
1
ave returns wrong data type (PR#13664)
Full_Name: Brendan Barnwell Version: 2.9.0 OS: Windows XP Pro Submission from: (NULL) (71.102.131.29) The ave() function returns an incorrect datatype. Specifically, ave(x, g, f) always returns a vector with the same mode as x, rather than using the mode of the vector returned by f. Observe: > x [1] "A" "B" "C" "A" "B" "C"
2009 Mar 25
1
Requesting help with lattice again
Hello, this is a request for assistance that I submitted earlier, this time with the dataset. My mistake for taking up bandwidth. I've also rephrased the question to address an additional concern. I'm working on a windows XP machine with R 2.8.1 1). I'd like a barchart (or other lattice type display) HSI ~ of the three factors (Region, Scenario and HydroState). However
2010 Aug 20
2
Problem with POSIXct in ave
Hi, I am having trouble using the ave function with a POSIXct object. For example: x<-Sys.time()+0:9*3600 dat<-data.frame(id=rep(c('a',' b','c'),each=10),dt=rep(x,3),i=rep(1:10,3)) dat # This is what I want to do: dat$time.elapsed<-unsplit(lapply(split(dat$dt,dat$id),function(x) x-x[1]),f=dat$id) dat # The above code does the trick, but from the standpoint of
2010 Jun 29
1
Performance enhancement for ave
library(plyr) n<-100000 grp1<-sample(1:750, n, replace=T) grp2<-sample(1:750, n, replace=T) d<-data.frame(x=rnorm(n), y=rnorm(n), grp1=grp1, grp2=grp2) system.time({ d$avx1 <- ave(d$x, list(d$grp1, d$grp2)) d$avy1 <- ave(d$y, list(d$grp1, d$grp2)) }) # user system elapsed # 39.300 0.279 40.809 system.time({ d$avx2 <- ave(d$x, interaction(d$grp1, d$grp2, drop =
2015 Jul 27
4
Como modificar valores en un data frame
Estimad en s, quería realizar una consulta Dado un data frame llamado aves, como puedo sustiuir las variables area, dist y distm por sus logaritmos en base10 y volver a crear un data frame? Muchas gracias Saludos Susana [[alternative HTML version deleted]]
2009 Feb 15
2
Fast ave for sorted data?
Hi, This is probably really obvious, by I can't seem to find anything on it. Is there a fast version of ave for when the data is already sorted in terms of the factor, or if the breaks are already known? Basically, I have: X = 0.1, 0.2, 0.32, 0.32, 0.4, 0.56, 0.56, 0.7... Y = 223, 434, 343, 544, 231.... etc of the same, admittedly large length. Now note that some of the values of X are
2013 Apr 09
4
Boxplot Labels OK
Dear all, I have just sent an enquiry but probably I hadn’t expressed myself properly. Could anyone help me with the following? When I run the code on my data I get a boxplot with outliers identified by numbers 200 & 201. However, what I would like is to label these outliers with their corresponding “DATA$num” values of the data frame. In this example, the outliers should be labelled as:
2017 Jun 14
1
spurious warning in ave()
Consider the following simple data set and a call to ave: > tdata <- data.frame(f1=c(1,1,1,1,2,2,2,2), f2=c(1,2,1,2,1,1,1,1), y=1:8) > with(tdata, table(f1, f2)) f2 f1 1 2 1 2 2 2 4 0 > with(tdata, ave(y, f1, f2, FUN=max)) [1] 3 4 3 4 8 8 8 8 Warning message: In FUN(X[[i]], ...) : no non-missing arguments to max; returning -Inf There are no missing values in the
2007 Nov 16
0
Odp: R: ave and quantile
Hi Patrick Hausmann <c18g at uni-bremen.de> napsal dne 15.11.2007 18:59:06: > Hello Petr, > > one question solved, the next is standing in front of me... If you > have a minute to look .... great! > > > x > V1 V2 F1 > 1 A 2 0.1552277 > 2 A 3 0.1552277 > 3 A 4 0.1552277 > 4 B 3 0.8447723 > 5 B 2 0.8447723 > 6 C 6 0.2500000
2009 Mar 02
2
ave and grouping
Dear list, # I have a DF like this: sleep$b <- c(rep(8,10), rep(9,10)) sleep$me <- with(sleep, ave(extra, group, FUN = mean)) sleep # I would like to create a new variable # holding the b-th value of group 1 and 2. # This is not what I want, it takes always the '8' from group '1' # and not the '9' sleep$gr <- with(sleep, ave(extra, group, FUN = function(x)
2012 Dec 24
2
parallelized version of "by" and "ave"
Dear R experts--- Has anyone written parallel versions of "by" (i.e., mcby) and "ave" (i.e. mcave) ? I did ask a question like this a year ago, and then the answer was no. for those who are googling the group for the answer to this question, in the meantime, the poor man's version of "by" is mclapply( split( ds, factor ), FUN ) I don't know the poor
2010 Jan 20
5
standardizing one variable by dividing each value by the mean - but within levels of a factor
Hello! I have a data frame with a factor and a numeric variable: x<-data.frame(factor=c("b","b","d","d","e","e"),values=c(1,2,10,20,100,200)) For each level of "factor" - I would like to divide each value of "values" by the mean of "values" that corresponds to the level of "factor" In other
2014 Jan 12
6
Duda Regresión Multiple
Buenos días, Me gustaría aplicar una regresión múltiple a los datos con los que trabajo pero no se como introducir los datos en R. He probado introducir el siguiente comando: modeloM<-lm(AVE.~ d1 + as.factor(d1T)*Tariff) summary(modeloM) Pero me da el siguiente error: > summary(modeloM) Error in if (attr(z$terms, "intercept")) sum((f - mean(f))^2) else sum(f^2) : argument is
2008 Aug 25
3
lmer4 and variable selection
Dear list, I am currently working with a rather large data set on body temperature regulation in wintering birds. My original model contains quite a few dependent variables, but I do not (of course) wish to keep them all in my final model. I've fitted the following model to the data: >
2010 Mar 05
2
How to assign week numbers to a time-series
Hello everyone, My progress has stalled on finding a way of creating a somewhat complicated variable to add to my existing dataframe and I am hoping one of you could help me out. The dataframe below contains only a fraction of the data of my complete dataframe, but all of the variables. What I want to do is add another variable named 'WEEK' to this dataframe that is assigned 1 for row 1
2007 Nov 21
1
ave and sd
Dear list, I'm still trying to calculate the sd for V2 for each group in V1 if V3 is '0': > x V1 V2 V3 1 A01 2.40 0 2 A01 3.40 1 3 A01 2.80 0 4 A02 3.20 0 5 A02 4.20 0 6 A03 2.98 1 7 A03 2.31 0 8 A04 4.20 0 # Work x$vmean <- ave(x$V2, x$V1, x$V3 == 0, FUN = mean) # Work x$vsd2 <- ave(x$V2, x$V1, FUN = sd) # Doesn't work x$vsd <- ave(x$V2, x$V1, x$V3
2009 Apr 15
0
ave returns wrong type
I've been using the ave function to compute some statistics on a data frame. After a while I noticed that, for some reason, it was returning numerical statistics as strings instead of numbers. I delved into the code of the functions and traced the problem to the following fact: ave uses split<- to do its work. Specifically, it does "split(x, g) <- lapply(split(x, g),
2014 Jan 14
2
Duda Regresión Multiple
Buenos días, *Muchas gracias, todas las aportaciones han sido bien útiles.* Las he tenido en cuenta y he pasado los datos con el R, siguiendo el siguiente comando: *modeloRTUN2<-lm(AVE.~ Tariff + d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9+ d10 + d11+ d12+ d13+ d14+ d15+ d16+ d17+ d18+ d19+ d20 +d21 + Tariff*d1 + Tariff*d2 + Tariff*d10)* *summary(modeloRTUN2)* Siendo: AVE. = Variable
2011 May 03
6
Simple loop
Hello everybody, I am beginning with loops and functions and would be glad to have help in the following question: If i have a dataframe like this Site Prof H 1 1 24 1 1 16 1 1 67 1 2 23 1 2 56 1 2 45 2 1 67 2 1 46 And I would like to create a new column that subtracts the minimum of H from H, but for S1 and P1 only