search for: x_names

Displaying 6 results from an estimated 6 matches for "x_names".

Did you mean: c_names
2017 Sep 09
0
Avoid duplication in dplyr::summarise
Hi Lars I am not very sure what you really want. However, I am suggesting the following code that enables (1) to obtain the full summary of your data and (2) retrieve only mean of X values as function of factors f1 and f2. library(tidyverse) library(psych) df <- data.frame(matrix(rnorm(40), 10, 4), f1 = gl(3, 10, labels = letters[1:3]), f2 = gl(3, 10, labels
2017 Sep 09
2
Avoid duplication in dplyr::summarise
Dear group, Is there a way I could avoid the sort of duplication illustrated below? i.e., I have the same dplyr::summarise function on different group_by arguments. So I'd like to create a single summarise function that could be applied to both. My attempt below fails. df <- data.frame(matrix(rnorm(40), 10, 4), f1 = gl(3, 10, labels = letters[1:3]), f2 =
2017 Sep 09
1
Avoid duplication in dplyr::summarise
Hi Lars, Two comments: 1. You can achieve what you want with a slight modification of your definition of s(), using the hint from the error message that you need an argument '.': s <- function(.) { dplyr::summarise(., x1m = mean(X1), x2m = mean(X2), x3m = mean(X3), x4m = mean(X4)) } 2. You have not given a great test case in
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all, I wrote a small function to add labels for outliers in a boxplot. This function will only work on a simple boxplot/formula command (e.g: something like boxplot(y~x)). Code + example follows in this e-mail. I'd be happy for any suggestions on how to improve this code, for example: - Handle boxplot.matrix (which shouldn't be too hard to do) - Handle cases of complex
2006 Feb 08
2
rotating axis / mtext labels
Hello list. Is it possible to use par(srt=45) to rotate text by 45 degrees along the x-axis of a plot. Using: <code> x_names<-c("C57 Nv", "C57 Vacc", "129 Nv", "129 Vacc", "IFNgR Nv", "IFNgR Vacc") par(srt=45) mtext(font=2, x_names, side=1, line=1, at=l, cex=1.2) par(srt=0) </code> doesn't seem to work in R 2.2.0 on SUSE linux. Suggestions would...
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,