similar to: Replicating Rows

Displaying 20 results from an estimated 3000 matches similar to: "Replicating Rows"

2007 Nov 19
1
mulitmodal distributions
Hello, I see that "mclust" is a pacakge that handles fitting mixtures of normals. Are there any other packages out that that can handle mixtures of gammas or other exponentials? Additionally, are there any packages out there that can fit bimodal distributions without mixtures? i.e., Cobb et al. 1983 using moment recursion relations? Thank you! mw Marion Wittmann, Ph.D.
2005 Sep 23
1
Alternative to nlm()
Greetings, I am using the nlm function in a minimization exercise but have consistently received the code: "last global step failed to locate a point lower than 'estimate'...." So it seems that this function is only finding a local minimum, not necessarily a global minimum. Does anyone have a suggestion or recommendation for an alternative package or function within R
2008 Apr 28
1
Label Rotation when Plotting with Factors
Hello, Sorry if this is a repeat, having trouble finding what I need on archive and am a novice with graphics in R! I have plotted the results of a logit regression by factor, where "city" is the factor set name. The problem is city names are too long and I need to rotate them 90 degrees along the xaxis. This is what I've tried... plot(city, predicted.probability, xlab =
2007 Nov 20
0
try FlexMix RE: mulitmodal distributions
Hi, Marion, I believe the package FlexMix provides a more generalized version of finite mixture modeling than is found in mclust/mclust02. Please see: http://cran.r-project.org/doc/vignettes/flexmix/flexmix-intro.pdf Karen --- Karen M. Green, Ph.D. Karen.Green@sanofi-aventis.com Research Investigator Drug Design Group Sanofi Aventis Pharmaceuticals -----Original Message-----
2008 Jan 07
0
Help with flexmix
Hello, I am using the package "flexmix", specifically the function "stepFlexmix" and was hoping for some assistance: Here is my input: fit <- stepFlexmix(trips~.,data=data.frame(traveldata),k=1:5,nrep=5,model=FLXMRglm( family="gaussian")) And I recieve the following error message: *Error in FLXfit(model = model, concomitant = concomitant, control =
2009 Sep 28
1
Bubble Plot
Hello, I am using the bubble plot and have been able to overlay two different data sets on the same graphic successfully. I would like to do the following and cannot: 1) suppress the zero values such that there is no representation of them on my plot (i.e., the "zeroes" show up as the smallest dot size, and I can't change this) 2) Give values to y or x axes with values, and
2009 Nov 29
1
Convergence problem with zeroinfl() and hurdle() when interaction term added
Hello, I have a data frame with 1425 observations, 539 of which are zeros. I am trying to fit the following ZINB: f3<-formula(Nbr_Abs~ Zone * Year + Source) ZINB2<-zeroinfl(f3, dist="negbin", link= "logit", data=TheData, offset=log(trans.area), trace=TRUE) Zone is a factor with 4 levels, Year a factor with 27 levels, and Source a factor with 3 levels. Nbr_Abs is counts
2018 Feb 05
1
pulling recessions out of a hydrograph
Dear R community, I'm hoping someone out there has perhaps done this and can share their code and/or expertise with me. I need to pull recession periods out of a hydrograph - can anyone help me with this? I want to create a subset from streamflow data that consists of just the recession curves - the decreasing runoff after the passage of a peak flow. would really appreciate any help on
2009 Jun 15
1
altering a global variable
I'm working on a program that loads several large data files. I'm using ddply (plyr is really awesome) but I want to minimize the amount of times a large data file is read in. One solution is to keep track of which data file is open with a global variable and then change the currently open data file globally as needed. However, I'm unclear on how to alter a global variable
2007 Apr 01
4
Abundance data ordination in R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070401/33921c2a/attachment.pl
2017 Nov 09
0
weighted average grouped by variables
Hello an update about my question: I worked out the following solution (with the package "dplyr") library(dplyr) mydf%>% mutate(speed_vehicles=n_vehicles*mydf$speed) %>% group_by(date_time,type) %>% summarise( sum_n_times_speed=sum(speed_vehicles), n_vehicles=sum(n_vehicles), vel=sum(speed_vehicles)/sum(n_vehicles) ) In fact I was hoping to manage everything in a
2017 Nov 09
4
weighted average grouped by variables
hi all I have this dataframe (created as a reproducible example) mydf<-structure(list(date_time = structure(c(1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000), class = c("POSIXct", "POSIXt"), tzone = ""), direction = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L), .Label = c("A", "B"), class =
2017 Nov 22
0
assign NA to rows by test on multiple columns of a data frame
Hello, Try the following. icol <- which(grepl("flag", names(mydf))) mydf[icol] <- lapply(mydf[icol], function(x){ is.na(x) <- x == 0 x }) mydf # A A_flag B B_flag #1 8 10 5 12 #2 7 NA 6 9 #3 10 1 2 NA #4 1 NA 1 5 #5 5 2 0 NA Hope this helps, Rui Barradas On 11/22/2017 10:34 AM, Massimo Bressan
2017 Nov 22
1
assign NA to rows by test on multiple columns of a data frame
...well, I don't think this is exactly the expected result (see my post) to be noted that the columns affected should be "A" and "B" thanks for the help max ----- Messaggio originale ----- Da: "Rui Barradas" <ruipbarradas at sapo.pt> A: "Massimo Bressan" <massimo.bressan at arpa.veneto.it>, "r-help" <r-help at
2017 Nov 22
6
assign NA to rows by test on multiple columns of a data frame
Given this data frame (a simplified, essential reproducible example) A<-c(8,7,10,1,5) A_flag<-c(10,0,1,0,2) B<-c(5,6,2,1,0) B_flag<-c(12,9,0,5,0) mydf<-data.frame(A, A_flag, B, B_flag) # this is my initial df mydf I want to get to this final situation i<-which(mydf$A_flag==0) mydf$A[i]<-NA ii<-which(mydf$B_flag==0) mydf$B[ii]<-NA
2017 Nov 09
2
weighted average grouped by variables
Hi Thanks for working example. you could use split/ lapply approach, however it is probably not much better than dplyr method. sapply(split(mydf, mydf$type), function(speed, n_vehicles) sum(mydf$speed*mydf$n_vehicles)/sum(mydf$n_vehicles)) gives you averages aggregate(mydf$n_vehicles, list(mydf$type), sum)$x gives you sums Cheers Petr > -----Original Message----- > From: R-help
2005 Feb 02
1
anova.glm (PR#7624)
There may be a bug in the anova.glm function. deathstar[32] R R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project
2007 Oct 20
0
pairs, par("plt")
I'm having some confusion over the coordinate system after using pairs. I'm not interested in the content of the actual pairs plot, although the number of pairs seems to matter a bit. I'm purely interested in knowing where my points will be plotted on the device. However, after using pairs, the par information (omd, fig, plt, and usr) don't reflect what points does. For example:
2017 Nov 11
0
weighted average grouped by variables
> On 9 Nov 2017, at 14:58, PIKAL Petr <petr.pikal at precheza.cz> wrote: > > Hi > > Thanks for working example. > > you could use split/ lapply approach, however it is probably not much better than dplyr method. > > sapply(split(mydf, mydf$type), function(speed, n_vehicles) sum(mydf$speed*mydf$n_vehicles)/sum(mydf$n_vehicles)) > gives you averages > The
2007 Oct 29
1
pairs, par
Hi, I posted over at R-help, and didn't get a response, but perhaps that was the wrong forum for this question. I'm having some confusion over the coordinate system after using pairs. I'm not interested in the content of the actual pairs plot, although the number of pairs seems to matter a bit. I'm purely interested in knowing where subsequent points will be plotted on the