search for: grp1

Displaying 20 results from an estimated 54 matches for "grp1".

Did you mean: grp
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....
2018 Mar 06
4
Capturing warning within user-defined function
...2) grp <- sample(c(replicate(315, "Group1"), replicate(3672, "Group2"), replicate(1080, "Group3"), replicate(998, "Group4"))) dta <- data.frame(grp, wt) head(dta) str(dta) # declare design my.svy <- svydesign(ids=~1, weights=~wt, data=dta) # subset grp1 <- subset(my.svy, grp == "Group1") # set options and clear old warnings options(warn=0) assign("last.warning", NULL, envir = baseenv()) ## proportions and CIs p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) # save warnings wrn1 <- warnings(p) ci_l <- (con...
2010 Jan 12
1
Unable to map the group
Hi All, I am using Samba 3.2.11 on sles 10. I have create a Unix group 'grp1' and mapped it to a ntgroup "Group One". Unix group 'grp1' has one user i.e 'usr1'. 'net groupmap' command show the mapping with correct SID and gid value. Please, have a look here. # cat /etc/group | grep grp1 grp1:!:12613:usr1,raj1,raj2 # # net groupmap li...
2011 Jan 31
2
identify subsets based on two grouping factors
Hi, I have a data.frame that has a categorical variable, for which I would like to look at the distribution of levels of this variable, based on a grouping of two other variables. As an example: x <- data.frame(obs=sample(c('low', 'high'),100, replace=TRUE), grp1=sample(1:10, 100, replace=TRUE), grp2=runif(100)) cut.grp1 <- cut(x$grp1, 3) cut.grp2 <- cut(x$grp2, 3) Thus, for each combination of levels in cut.grp1 and cut.grp2, I'd like to obtain the distribution of levels obs. I know I can loop over each pair of levels in cut.grp1 and cut.grp2,...
2018 Mar 06
1
Capturing warning within user-defined function
...; > replicate(1080, "Group3"), replicate(998, "Group4"))) > > dta <- data.frame(grp, wt) > > head(dta) > > str(dta) > > > > # declare design > > my.svy <- svydesign(ids=~1, weights=~wt, data=dta) > > > > # subset > > grp1 <- subset(my.svy, grp == "Group1") > > > > # set options and clear old warnings > > options(warn=0) > > assign("last.warning", NULL, envir = baseenv()) > > > > ## proportions and CIs > > p <- ((svyciprop(~grp, grp1, family=quasibin...
2018 Mar 06
0
Capturing warning within user-defined function
...1"), replicate(3672, "Group2"), > replicate(1080, "Group3"), replicate(998, "Group4"))) > dta <- data.frame(grp, wt) > head(dta) > str(dta) > > # declare design > my.svy <- svydesign(ids=~1, weights=~wt, data=dta) > > # subset > grp1 <- subset(my.svy, grp == "Group1") > > # set options and clear old warnings > options(warn=0) > assign("last.warning", NULL, envir = baseenv()) > > ## proportions and CIs > p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) > > # save warnin...
2009 Dec 10
1
Help with beanplot fromatting
Dear Helpful R Users, I am graphing some data using the beanplot, but I am having trouble getting the output I desire. I have five tanks (A-E) and 2 groups for each tank grp1 or grp2, except tank C where there is only grp1. (I only changed the grouprep to "C grp1" for the example) When I plot them, I would like A B C(only grp1 - half of the bean plot) then D and E (as full beans). I assume there is some way to do this, but searching the help archives, I h...
2018 Mar 06
0
Capturing warning within user-defined function
...1"), replicate(3672, "Group2"), > replicate(1080, "Group3"), replicate(998, "Group4"))) > dta <- data.frame(grp, wt) > head(dta) > str(dta) > > # declare design > my.svy <- svydesign(ids=~1, weights=~wt, data=dta) > > # subset > grp1 <- subset(my.svy, grp == "Group1") > > # set options and clear old warnings > options(warn=0) > assign("last.warning", NULL, envir = baseenv()) > > ## proportions and CIs > p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1]) > > # save warnin...
2018 Dec 05
1
Restricting sending mail to domain or group
...018, Alexander Dalloz wrote: >> I have a group alias (all at company.com). >> (1) Only company.com accounts should be able to send an email to everybody >> in that company via all at company.com. >> (2) - rather optional: refine the restrictions, e.g. two groups, >> grp1 at company.com and grp2 at company.com. Grp1 members should be able to send >> mails to grp2 but not vice versa. > > Both to be setup on MTA side. Agreed. You can manage your mailing lists with software (e.g. mailman), or hack in a filter between the (public) external and (secret) in...
2011 Feb 08
2
Convert the output of by() to a data frame
I'd like to summarize several variables in a data frame, for multiple groups, and store the results in a data.frame. To do so, I'm using by(). For example: df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range) The result has a class of "by" and a mode of "list...
2018 Dec 05
6
Restricting sending mail to domain or group
Hi folks, has anybody a simple solution for the following request? I have a group alias (all at company.com). (1) Only company.com accounts should be able to send an email to everybody in that company via all at company.com. (2) - rather optional: refine the restrictions, e.g. two groups, grp1 at company.com and grp2 at company.com. Grp1 members should be able to send mails to grp2 but not vice versa. What else than sieve would keep dealing with that demands as simple as possible? Thanks in advance and sorry for abusing this list for this kind of ?problem? which is not a bug. Regards,...
2011 Oct 10
3
question about string to boor?
Hello! So I am handling this problem with some arrays grp1-grp7, I want to write a loop to avoid tedious work, but I don't know how to transform string to boor? For example I used i=1 paste("grp",i, sep="") I only got "grp1" instead of grp1, which can't be manipulate using mean() or other function. I am not sure i...
2011 Jan 31
1
arranging pie charts in a matrix layout with row/col labels
...art. I can layout these pie charts in a matrix layout, correpsonding to the levels of the two factors. But I am getting stuck on how to label the rows and colums. My current approach looks like this: x <- data.frame(obs=sample(c('low', 'high'),100, replace=TRUE), grp1=sample(1:10, 100, replace=TRUE), grp2=runif(100)) cut.grp1 <- cut(x$grp1, 3) cut.grp2 <- cut(x$grp2, 3) par(mfrow=c(3,3)) tapply(x$obs, list(cut.grp1, cut.grp2), function(z) { pie(table(z), col=c('red', 'green')) }) One possibility is to add an extra row a...
2004 Oct 22
1
ave gives unexpected NA's
[R 2.0.0 on Linux] I tried: > df <- data.frame( grp1=factor( c('A' ,'A' ,'A' ,'D', 'D' ) ) , grp2=factor( c('a1','a2','a2','d1','d1') ) ) > df grp1 grp2 val 1 A a1 1 2 A a2 2 3 A a2 4 4 D d1 8 5 D d1 16 I got: > with( d...
2011 Apr 07
1
plyr workaround to converting by() to a data frame
Dear all Is there a clean plyr version of the following by() and do.call(rbind, ...) construct: > df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) > dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range) > as.data.frame(dfsum) Error in as.data.frame.default(dfsu...
2011 Apr 13
1
error for ttest
Hello all, I have arranged my data as per Dennis's suggestion in this post http://www.mail-archive.com/r-help at r-project.org/msg107156.html. the posted code works fine but when I try to apply it to my data, i get "> u2 <- ddply(xxm, .(plateid, cytokine), as.data.frame.function(f)) Error in t.test.formula(conc ~ Self_T1D, data = df, na.rm = T) : grouping factor must have
2010 Aug 11
2
help to polish plot in ggplot2
Hi, I wanted to generate a plot which is almost like the plot generated by the following codes. category <- paste("Geographical Category", 1:10) grp1 <- rnorm(10, mean=10, sd=10) grp2 <- rnorm(10, mean=20, sd=10) grp3 <- rnorm(10, mean=15, sd=10) grp4 <- rnorm(10, mean=12, sd=10) mydat <- data.frame(category,grp1,grp2,grp3,grp4) dat.m <- melt(mydat) p <- qplot(1,value, data=dat.m, geom="bar", xlab="",...
2008 Aug 18
3
Samba 3.0.x access rights issue with secondary groups or Unix rights
...s as member server of an Active Directory 2003 R2 domain (MYDOMAIN) using Identity Management for Unix I set rights to access a sub folder of a Samba share. On Solaris the user "toto" jdoe can write a new file. From Windows, the same user can't. Itlooks like OK when the primary group (grp1) of the user is the group that own the subtree but not when this owner group is a secondary group (grp2). It is OK If I set explicitly the user right from MS Windows I can't change the access rights to the group from MS Windows I suspect Unix ownership or ACL to be the root cause but I can'...
2009 Jun 30
0
anova with missing data (incomplete design)
hi, I have the following data: x1 y1 y2 y3 1.3 grp1 a1 NA 2.4 grp1 a1 NA 3.7 grp1 a2 NA 1.9 grp1 a2 NA 2.2 grp2 NA b1 3.5 grp2 NA b1 7.7 grp2 NA b2 6.0 grp2 NA b2 how can I analyse this with the anova-function? I get the error message "error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : contrasts can b...
2009 Aug 25
0
comparing tables from replicated data
...r the less complex model. To understand (a bit at least) what goes on I have tried to see the observed data under random group assignment in the hope to be able to compare directly and formally the results from the replicates under the two models. Here are the observed changes in the 16 pigs and grp1 is treated and 2 is control. grp <- as.factor(c(rep(1,10),rep(2,6))) val <- c(6,12,11,11,11,13,15,13,11,11,2,3,1,1,1,2) test <- sum(val[grp==1]<max(val[grp==2])) # 0 #Now under random perturbations of group assignments, #what would occur??? TT <- NULL for (i in 1:1000){ ind <-...