similar to: Plot grouped histograms

Displaying 20 results from an estimated 2000 matches similar to: "Plot grouped histograms"

2009 Mar 06
4
Summary grouped by factor
### example:start v <- sample(rnorm(200), 100, replace=T) k <- rep.int(c("locA", "locB", "locC", "locD"), 25) tapply(v, k, summary) ### example:end ... (hopefully) produces 4 summaries of v according to k group membership. How can I transform the output into a nice table with the croups as columns and the interesting statistics as lines? Thx,
2009 Nov 22
3
Define return values of a function
I have created a function to do something: i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5, 1))) k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9, 1))) mytable <- function(x){ xtb <- x btx <- x # do more with x, not relevant here cat("The table has been created,
2009 Mar 11
3
chisq.test: decreasing p-value
A Likert scale may have produced counts of answers per category. According to theory I may expect equality over the categories. A statistical test shall reveal the actual equality in my sample. When applying a chi square test with increasing number of repetitions (simulate.p.value) over a fixed sample, the p-value decreases dramatically (looks as if converge to zero). (1) Why? (2) (If
2009 Mar 07
2
Recode factor into binary factor-level vars
How to I "recode" a factor into a binary data frame according to the factor levels: ### example:start set.seed(20) l <- sample(rep.int(c("locA", "locB", "locC", "locD"), 100), 10, replace=T) # [1] "locD" "locD" "locD" "locD" "locB" "locA" "locA" "locA"
2008 Sep 07
2
Regression with nominal data
Hi, y is nominal (3 categories), x1 to 3 is scale. What I want is a regression, showing the probability to fall in one of the three categories of y according to the x. How can I perform such a regression in R? Thanks for your help S?ren
2010 Jan 29
2
cbind, row names
Hello, I read the help as well as the examples, but I can not figure out why the following code does not produce the *given* row names, "x" and "y": x <- 1:20 y <- 21:40 rbind( x=cbind(N=length(x), M=mean(x), SD=sd(x)), y=cbind(N=length(y), M=mean(y), SD=sd(y)) ) Could you please help? Thank you S?ren
2010 Apr 16
2
Return a variable name
Hello, how can I return the name of a variable, say "a$b", from a function? fun <- function(x){ return(substitute(x)); } a <- data.frame(b=1:10); fun(a$b) ... returns a$b, but this is a type language, thus I can't use it as a character string, can I? How? Thanks for help, S?ren
2010 Nov 17
2
slicing list with matrices
A list contains several matrices. Over all matrices (list elements) I'd like to access one matrix cell: m <- matrix(1:9, nrow=3, dimnames=list(LETTERS[1:3], letters[1:3])) l <- list(m1=m, m2=m*2, m3=m*3) l[[3]] # works l[[3]][1:2, ] # works l[[1:3]][1, 1] # does not work How can I slice all C-c combinations in the list? S?ren -- S?ren Vogel, Dipl.-Psych. (Univ.), PhD-Student, Eawag,
2010 May 08
2
Adding NAs to data.frame
Hello, after the creation of a data.frame I like to add NAs as follows: n <- 743; x <- runif(n, 1, 7); Y <- runif(n, 1, 7); Ag6 <- runif(n, 1, 7); df <- data.frame(x, Y, Ag6); # a list with positions: v <- apply(df, 2, function(x) sample(n, sample(1:ceiling(5*n/100), 1), repl=F)); # a loop too much? for (i in 1:length(df)){ df[unlist(v[i]), i] <- NA; } summary(df); This
2009 Feb 27
2
add absolute value to bars in barplot
Hello, r-help at r-project.orgbarplot(twcons.area, beside=T, col=c("green4", "blue", "red3", "gray"), xlab="estate", ylab="number of persons", ylim=c(0, 110), legend.text=c("treated", "mix", "untreated", "NA")) produces a barplot very fine. In addition, I'd like to get the
2009 Mar 08
1
Summary of data.frame according to colnames and grouping factor
A dataframe holds 3 vars, each checked true or false (1, 0). Another var holds the grouping, r and s: ### start:example set.seed(20) d <- data.frame(sample(c(0, 1), 20, replace=T), sample(c(0, 1), 20, replace=T), sample(c(0, 1), 20, replace=T)) names(d) <- c("A", "B", "C") e <- rep(c("r", "s"), 10) ### end:example How do I get the
2015 May 31
4
Re: [ovirt-users] Bug in Snapshot Removing
Small addition again: This error shows up in the log while removing snapshots WITHOUT rendering the Vms unresponsive — Jun 01 01:33:45 mc-dc3ham-compute-02-live.mc.mcon.net libvirtd[1657]: Timed out during operation: cannot acquire state change lock Jun 01 01:33:45 mc-dc3ham-compute-02-live.mc.mcon.net vdsm[6839]: vdsm vm.Vm ERROR vmId=`56848f4a-cd73-4eda-bf79-7eb80ae569a9`::Error getting block
2015 Jun 02
2
Re: [ovirt-users] Bug in Snapshot Removing
Hello Soeren. I've started to look at this issue and I'd agree that at first glance it looks like a libvirt issue. The 'cannot acquire state change lock' messages suggest a locking bug or severe contention at least. To help me better understand the problem I have a few questions about your setup. >From your earlier report it appears that you have 15 VMs running on the
2015 Jun 04
2
Re: [ovirt-users] Bug in Snapshot Removing
Hi, I would send those, but unfortunately we did not think about the journals getting deleted after a reboot. I just made the journals persistent on the servers, we are trying to trigger the error again last time we only got half way through the VM’s when removing the snapshots so we have a good chance that it comes up again. Also the libvirt logs to the journal not to libvirtd.log, i would
2009 Mar 25
2
pca vs. pfa: dimension reduction
Can't make sense of calculated results and hope I'll find help here. I've collected answers from about 600 persons concerning three variables. I hypothesise those three variables to be components (or indicators) of one latent factor. In order to reduce data (vars), I had the following idea: Calculate the factor underlying these three vars. Use the loadings and the original var
2015 Jun 04
2
Re: [ovirt-users] Bug in Snapshot Removing
Hi Adam, Hi Eric, We had this issue again a few minutes ago. One machine went down exactly the same way as described, the machine had only one snapshot and it was the only snapshot that was removed, before that in the same scriptrun we deleted the snapshots of 15 other Vms, some without, some with 1 and some with several snapshots. Can i provide anything from the logs that helps ? Regards
2011 Aug 07
1
fail to correctly build 1.8.5 ??
Hello everybody, I've been using asterisk 1.2 for quite a long time now, but I thought it's time to try a newer version of asterisk. So I downloaded 1.8.5, extracted the tar, ran configure, make, make install ... Everything looks fine (no obvious compile/link errors). But as soon as I start asterisk, it dies with a segfault. I executed asterisk within strace and last action before the
2008 Feb 25
6
[PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
Hi. The patch I send before was too large so that it was dropped from the maling list. I'm sending again with smaller size. This patch set is the xen paravirtualization of hand written assenbly code. And I expect that much clean up is necessary before merge. We really need the feed back before starting actual clean up as Eddie already said before. Eddie discussed how to clean up and suggested
2008 Feb 25
6
[PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
Hi. The patch I send before was too large so that it was dropped from the maling list. I'm sending again with smaller size. This patch set is the xen paravirtualization of hand written assenbly code. And I expect that much clean up is necessary before merge. We really need the feed back before starting actual clean up as Eddie already said before. Eddie discussed how to clean up and suggested
2012 Aug 09
0
[LLVMdev] MI bundle liveness attributes
Hello everyone, Let me (re)present a question that might have previously been discussed, but did not result in any code (AFIK). How do we represent a _conditional_ assignment (def) in a bundle MI? More contents - currently we expose internal def/use/kill information to a bundle header - something like this: BUNDLE %PC<imp-def>, %R0<imp-def>, %P0<imp-use,kill>,