Displaying 20 results from an estimated 5000 matches similar to: "Iterative process for reading in text files"
2011 May 13
0
How do I break my addiction to for loops!?!?
I know I'm not supposed to use them... but they're just so easy! I
have trouble defining an appropriate function for plyr or apply!
data<-rnorm(144)
groups1<-c('a','b','c','d')
groups2<-c('aa','bb','cc','dd')
machines<-1:12
2005 May 16
2
turning labels into a vector
Hello
1/ 'priors' is a table looking like:
"W123" "T678" "S789"
23 42 11
12 35 9
etc
2/ WBS <- labels(priors) gives me a result of class list and length 1 looking like:
"W123" "T678" "S789"
I want to read W123 into X[1] as W, T687 into X[2] as T and S789 into X[3] as S using
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
2012 Aug 21
2
Iterative sampling with restrictions
Hi all,
I'm working on a seemingly trivial problem that I can't figure out how
to implement in R. I'd be most grateful for any help here.
I want to do the following: first, randomly assign each of n units to
one of g groups of size n/g. Then, randomly re-assign each of the n
units to a different group (i.e., same as the first step, but the unit
can't be assigned to a group to
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
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
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
2008 Oct 02
2
aggregate empty row for pretty appearance also subtotal if possible
Hi,
To pretty print aggregates by various dimensions I needed to add a
empty row in output of aggregate.
For example.
d<-(aggregate(data[,cbind("x")], by=list(data$group1,data$group2),
sum))
Group.1 Group.2 x
1 A N 3
2 A Y 2
3 B N 420164905
Is there a way to add an empty
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 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 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
2005 Mar 22
2
LME correlation structures: user defined
Let me modify my question about user-defined covariance structures for LME models: Can somebody tell me how I can see the code for the definition of the correlation structures that come with the NLME package. Specifically I like to see the code for the functions coef, corMatrix, and intialize for any of the pre-defined correlation structures, and use this as a template to define a new correlation
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