Displaying 20 results from an estimated 4000 matches similar to: "aggregate empty row for pretty appearance also subtotal if possible"
2008 Oct 19
3
pairs plots in R
Hi,
is there a way to take a data frame with 100+ columns and large data set to do efficient exploratory analysis in R with pairs?
I find using pairs on the whole matrix is slow and the resulting matrix is tiny.
Also the variable of interest for me is a binary var Y or N .
Is there an efficient way to graphically view many variable relationships that does not look teeny ?
I could do
2010 Mar 06
3
r code to generate interaction columns
Hi,
is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically?
For e.g. there are 5 columns of data: A,B,C,D,E.
CDE are numeric.
Can someone provide code to automatically create more columns such as:
1) C*D, C*E, C*D*E, (C+E)/(D+.01 (to avoid divide by zero), (D+E)/(C+.01 (to avoid divide by zero), (C+D)/(E+.01 (to avoid
2011 Jul 14
2
cbind in aggregate formula - based on an existing object (vector)
Hello!
I am aggregating using a formula in aggregate - of the type:
aggregate(cbind(var1,var2,var3)~factor1+factor2,sum,data=mydata)
However, I actually have an object (vector of my variables to be aggregated):
myvars<-c("var1","var2","var3")
I'd like my aggregate formula (its "cbind" part) to be able to use my
"myvars" object. Is it
2011 Apr 30
1
More flexible aggregate / eval
Dear list,
I would like to do some calculation using different grouping variables.
My 'df' looks like this:
# Some data
set.seed(345)
id <- seq(200,400, by=10)
ids <- sample(substr(id,1,1))
group1 <- rep(1:3, each=7)
group2 <- rep(1:2, c(10,11))
group3 <- rep(1:4, c(5,5,5,6))
df <- data.frame(id, ids, group1, group2, group3)
df <- rbind(df, df, df)
df$time <-
2011 Apr 18
1
using "aggregate" when variable names contain spaces
Hello!
my data set has many variables. Unfortuantely, many of those variables
contain spaces in their names.
I need advice on: how to refer to variable names in the formula for
"aggregate". See example below:
### Generating example data set:
mydate = rep(seq(as.Date("2008-12-01"), length = 3, by = "month"),4)
value1=c(1,10,100,2,20,200,3,30,300,4,40,400)
2011 Mar 11
2
insertion of a row between individuals
Can someone help with a fairly simple task?
I have a data set where I would like to insert a 0 time event between
individuals:
what I have:
VAR DATE TIME CONC COVAR
1 NOV2 0.25 10 group1
1 NOV2 0.5 20 group1
1 NOV2 1 5 group1
1 NOV2 2 1 group1
1 NOV2 3 0.1 group1
2 NOV2 0.25 10
2011 Nov 03
1
Reclassify string values
Hi All,
Is there a simple way to convert a string such as c("A", "B" ,"C", "D")
to a string of c("Group1", "Group1", "Group2", "Group2"). Naturally I
could use the factor function as below but I don't like seeing that
warning message (and I don't want to turn off warning messages). Perhaps
a function
2012 Oct 17
3
subtotals based on price bands?
I would like to create a subtotal table with custom bands.
seq1 = seq(0, 100, by = 5)
seq2 = seq(100, 1000, by = 100)
Bands = c(seq1, seq2)
#Prices
Prices = sample(1:1000, 200, replace=F)
#corresponding size for the given price above.
size = sample(1:1000, 200, replace=F)
How would I find the subtotal of the size based on a given price falls
within a band?
--
View this message in
2005 Apr 20
1
negative p-values from fisher's test (PR#7801)
Full_Name: Martha Nason
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (137.187.154.154)
I am running simulations using fisher's test on 2 x c tables and a very small
p.value from fisher's test (<2.2e-16) is returned as a negative number. Code
follows.
> set.seed(0)
> nreps.outer <-7
> pvalue.fisher <- rep(NA,nreps.outer)
>
> population1 <- c(
2011 Apr 04
2
merging 2 frames while keeping all the entries from the "reference" frame
Hello!
I have my data frame "mydata" (below) and data frame "reference" -
that contains all the dates I would like to be present in the final
data frame.
I am trying to merge them so that the the result data frame contains
all 8 dates in both subgroups (i.e., Group1 should have 8 rows and
Group2 too). But when I merge it it's not coming out this way. Any
hint would be
2009 Sep 20
2
missing level of a nested factor results in an NA in lm output
Hello All,
I have posted to this list before regarding the same issue so I
apologize for the multiple e-mails. I am still struggling with this
issue so I thought I'd give it another try. This time I have included
reproducible code and a subset of the data I am analyzing.
I am running an ANOVA with three factors: GROUP (5 levels), FEATURE
(2 levels), and PATIENT (2 levels), where
2010 Jan 25
3
binary
Hi all
Assume I have a data set xx;
Group: 1=group1 ?, 2=group2
IQ: ?1= High, 0 =low
fit <- glm(IQ ~group, data = xx, family = binomial())
summary(fit)
Results
?????? ????????????Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.55456??? 0.210 -12.273? < 5e-16 ***
group????????? 0.36180 ?????0.076?? 3.952 ????5.24e-05 ***
the odd ratio = exp(0.36180 )= 1.435912
My question
2010 Sep 20
3
Depletion of small p values upon iterative testing of identical normal distributions
Dear all,
I'm performing a t-test on two normal distributions with identical mean &
standard deviation, and repeating this tests a very large number of times to
describe an representative p value distribution in a null case. As a part of
this, the program bins these values in 10 evenly distributed bins between 0
and 1 and reports the number of observations in each bin. What I have
noticed
2009 Mar 03
2
Reshape
Hi all,
I would like to transform to long format a matrix which has only
information about individuals and a value for each individual. I would like
to have it in ling format with more information related to groups, so ell
values and individuals are repeated for each group. Let me show the example:
matrix in wide format:
Individuals Value
A 3
B 4
C 5
D 2
And long format would
2005 Feb 23
1
How to conctruct an inner grouping for nlme random statement?
Hello. Im hoping someone can help with a grouping
question related to the "random=" statement within the
nlme function. How do you specify that some grouping
levels are inner to others? I tried several things,
given below.
Lets say I have a data frame with five variables,
resp, cov1, ran1, ran2, group1, and group 2. The
formula is resp~cov1 + ran1 + ran2, where the ran are
random
2011 Jul 29
1
question about groups
Hi all,
I have a (simple?) question about groups.
this is my scenario:
Windows Active directory domain
Samba file server ADS integrated
2 shares on this last server (share1, share2)
2 groups on the AD (group1 and group2)
First share is only fully available to group1: this is easily done
second share is fully available to group2
---
Then I have some users belonging to both group1 and
2011 Jun 01
2
Samba + ACL + Linux Client
Hello,
I'm Oliver and I need help for a experiment.
I have a sharing with Samba version 3.2.5, my distribution Linux is
Debian(Lenny) and the acl version is 2.2.47.
Below my configurations files:
#/etc/fstab
/dev/sda3 /shared reiserfs defaults,acl 0 1
#smb.conf
[data]
comment = files
path = /shared
inherit acls = yes
inherit permissions = yes
map acl inherit = Yes
#
2007 Aug 14
4
Mann-Whitney U
Hi,
Could someone please tell me how to perform a Mann-Whitney U test on a
dataset with 2 groups where one group has more data values than another?
I have split up my 2 groups into 2 columns in my .txt file i'm using with
R. Here is the code i have so far...
group1 <- c(LeafArea2)
group2 <- c(LeafArea1)
wilcox.test(group1, group2)
This code works for datasets with the same number
2009 Jul 22
2
sip configuration masking the peers
Hi all,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090722/30afa9ee/attachment.htm
2012 Nov 09
2
Passing an array of user groups to a define
As I try to get some flexibility in the creation of users, I switched to a
define.
problem is, I can''t pass an array of user groups anymore. This either
results in
- wrong group creation: group1,group1group2,group2 (see that group1 and
group2 are concatenated in the middle, undefined group)
- error: Group names must be provided as an array, not a comma-separated
list.
I use the