Displaying 20 results from an estimated 22 matches for "rep1".
Did you mean:
rep
2017 Oct 20
1
create a loop
...quot;), class =
"data.frame", row.names = c(NA,
-3L))
##
idx <- 1:nrow(dat1)
lll <- split(idx, dat1$group)
##########################
#Replication 1 create a resampled data
############################
Replication1<-dat1[unlist(lapply(lll, sample, rep=TRUE)),]
Summary.Rep1<-ddply(Replication1, c("group"), summarise,
N = length(group),
mean = mean(temp, na.rm=TRUE),
sd = sd(temp),
se = sd / sqrt(N),
variance=sd^2
)
#merge two datasets (dat1 and dat2)
Rep1<-merge(Summary.Rep1, dat2, by=&...
2005 Mar 29
2
matching vectors against vectors
...ts in the rows, and
a column for every dataset.
Now, not all datasets have a measurement for every identifier, so I
want NA if the set does not contain the identifier.
an example for a single dataset:
#all identifiers
> rep <- c(10:20)
#Identifiers in my dataset (a subset of rep)
> rep1 <- c(12,13,15,16,17,18)
#measurements in this dataset
> rep1.r <- c(112,113,115,116,117,118)
#a vector which should become a column in the final table, now
containing all NAs
> res <- rep(NA,10)
#the IDs and values of my dataset together
> data <- cbind(rep1, rep1.r)
da...
2007 Apr 26
2
path autocompletion in 2.5.0
Hi,
R 2.5.0 isn't auto-completing paths properly as it used to. E.g.
suppose I have:
> dir("CEL/choe")
[1] "chipC-rep1.CEL" "chipC-rep2.CEL" "chipC-rep3.CEL" "chipS-rep1.CEL"
[5] "chipS-rep2.CEL" "chipS-rep3.CEL"
Now if I do:
ReadAffy("CEL/choe/ch<tab> # => ReadAffy("CEL/choe/chip
ReadAffy("CEL/choe/chipC<tab> # => ReadAffy(&q...
2013 May 01
3
grep help (character ommission)
Hello,
Banging my head against a wall here ... can anyone light the way to a
pattern modification that would make the following TRUE?
identical(
grep(
"^Intensity\\s[^HL]",
c("Intensity","Intensity L", "Intensity H", "Intensity Rep1")),
as.integer(c(1,4)))
Thank you for your time.
Sincerely, Joh
2007 Apr 13
2
replicates in repeated ANOVA
..."),12)),
+ prepost = factor(rep(c(rep("pre",3),rep("post",3)),6)),
+ subj = factor(rep(paste("subj",1:6,sep=""),c(6,6,6,6,6,6))),
+ Group = factor(c(rep("Treat",18),rep("Control",18))))
> rt.df
rt rep prepost subj Group
1 287 rep1 pre subj1 Treat
2 283 rep2 pre subj1 Treat
3 261 rep3 pre subj1 Treat
4 298 rep1 post subj1 Treat
5 302 rep2 post subj1 Treat
6 280 rep3 post subj1 Treat
7 211 rep1 pre subj2 Treat
8 272 rep2 pre subj2 Treat
9 222 rep3 pre subj2 Treat
10 285 rep1 post subj2 Treat
11 253 rep2 post subj2 Tr...
2012 Apr 13
5
Merging two data frames with different columns names
...# Generate 2 blocks by confounding on abc
d1 <- conf.design(c(1,1,1), p=2, block.name="blk", treatment.names =
c("A","B","C"))
d2 <- conf.design(c(1,1,1), p=2, block.name="blk", treatment.names =
c("A","B","C"))
rep1 <- c(550,669,633,642,1037,749,1075,729)
rep2 <- c(604,650,601,635,1052,868,1063,860)
part1 <- data.frame(d1,rep1)
part2 <- data.frame(d2,rep2)
d12 <- rbind(part1,part2)
[[alternative HTML version deleted]]
2007 Sep 08
1
Problem with the aggregate command
...to aggregate the data and get the medians of each of the 23 columns for each of the years. In other words my output should be like this
Year Median
1991 123
1992 145
1993 132
etc.
The sample lines of code to do this operation is
set1 <- subset(as.data.frame(dataset),rep1==1)
set2 <- subset(as.data.frame(dataset),rep1==0)
lst <- list(unique(yeara))
y1 <- aggregate(set1,lst,median)
y2 <- aggregate(set2,lst,median)
However I'm getting an error as follows
Error in FUN(X[[1]], ...) : arguments must have same length
Can somebody please help me with wha...
2011 Jun 20
0
Mixed model for count data?
...erly. This is data from an instrument that measures the size of
particles but instead of giving a continuous value, it generates a
"histogram" of the counts for a particular bin size. So the data looks
like this:
Condition 1
Condition 2
Dimension Rep1.A Rep1.B Rep2.A Rep2.B Rep1.A Rep1.B Rep2.A Rep2.B
2 5 6 7 8
40 35 33 31
2.1 7 8 4 5 30
30 31 29
2.2 10 11 10...
2013 Jan 04
3
help "reshaping" dataframe
...t;occ.data" (see below) is how my original data are arranged, and I know
that with melt() I can reshape it like "y" (see below). However, I just
want to build a matrix like the "y" matrix, but with only 2 dimensions.
Something like this:
year Site specie Pres Rep1 Rep2 Rep3 Rep4 Rep5
1 2003 2021 MICH 1 0 0 1 1
0
3 2003 2021 MISA 1 1 0 0 0
0
4 2003 2021 MOBO 1 1 1 0 0
0
where "year" and "specie" are not a...
2005 Jun 03
2
How to 'de-cross' a table?
Dear R users,
I have received a table in the following format:
id a b c1 c2 d1 d2
1 1 1 65 97 78 98
2 1 2 65 97 42 97
3 2 1 65 68 97 98
4 2 2 65 97 97 98
Factors of the design are: a, b, and e, where e has levels c and d. The
levels c and d then have 2 replicates (r) each.
Now I would like to get:
id a b e r value
1 1 1 c 1 65
2 1 1
2005 May 31
1
read.delim2 regarding "#"
Hello R experts:
When I tried to read my data into R, it does not take
# sign
A subset of Exp.txt is:
Experiment name assay id Varname
(A1)DBA TPA 6h/DBA Acetone rep1(A1) #3 4090 A90C1
(A2)DBA TPA 6h/DBA Acetone rep2(A2) #3 4091 A91C1
The command is:
Exp <- read.delim2("Exp.txt",check.names=F,as.is=T)
It is excuted but gave me all the NAs. Can you all
drop me a hint?
Thanks in advance.
Kevin
2009 Jun 22
0
Help using substitute and expression functions
I'm stopped at a browser in a loop where the following objects look
like this:
Browse[1]> jk
[1] 1
Browse[1]> leg.ab[jk]
[1] "Snails Rep1"
Browse[1]> top.k
[1] "LT95=7.5; LT99=8.8"
I can join them and a few other characters together like this easily
enough:
Browse[1]> paste(jk, ": ", leg.ab[jk], " [", top.k, "]", sep = "")
[1] "1: Snails Rep1 [LT95=7.5; LT99=8.8]&quo...
2006 Aug 15
0
Help with workaround for: Function '`[`' is not in thederivatives table
...s) or numbers. If they are not, you need to
get even craftier.
> Ex1 <- D(Ex, "A__2")
> Ex1
A__1 * (exp(A__2 * X) * X)
> Ex1s <- deparse(Ex1)
> Ex1s
[1] "A__1 * (exp(A__2 * X) * X)"
> pat1 <- paste(Ident, "__", Subsc, sep = "")
> rep1 <- "\\1\\[\\2\\]"
> Ex1ss <- gsub(pat1, rep1, Ex1s)
> Ex1ss
[1] "A[1] * (exp(A[2] * X) * X)"
> Ex2 <- parse(text = Ex1ss)[[1]]
> Ex2
A[1] * (exp(A[2] * X) * X)
Which is the required result. This is messy and gets messier if you
are looking for some kind of...
2008 Mar 30
2
problem with white space
...ength 50 characters. I am currently doing this by first inserting a space
after each character in the dataset and then using the following commands:
y <- as.matrix(read.table("data.txt"), stringsAsFactors=FALSE)
bstrap <- sample(length(y), 100000, TRUE)
write(y[bstrap], file="Rep1.txt", ncolumns=50, append=FALSE)
bstrap <- sample(length(y), 100000, TRUE)
write(y[bstrap], file="Rep2.txt", ncolumns=50, append=FALSE)
bstrap <- sample(length(y), 100000, TRUE)
.
.
.
and so on for 500 reps.
I think there should be a better way of doing this. My specific que...
2010 Dec 11
2
remove quotes from the paste output
...is the snippet from my code:
modelResults <- extractModelParameters("C:/PilotStudy/Mplus_Input/Test",
recursive=TRUE)
#extractModelParameters reads all the output files from the Test folder and
create the following variables in R for each file read:
#C..PilotStudy.Mplus_Input.Test.rep1.out.unstandardized.est
#C..PilotStudy.Mplus_Input.Test.rep2.out.unstandardized.est
#C..PilotStudy.Mplus_Input.Test.rep3.out.unstandardized.est
modelResultsTemp <- as.data.frame(modelResults)
MeansTempC1 = rep(NA ,9)
counter = 1
for (f in 1:3)
{
i=31
for (g in 1:3)
{
OutputFileName <-
pas...
2004 May 20
1
Repeated measures ANOVA
...("week") (the "within subject" variable), and the main effects are: place, station,species, and all the interactions thereof.
Below, I pasted the commands I used, the analysis output, and a segment of my data (2 out of the 32 weeks) in order to show how I coded the data.
> Rep1<-read.csv("C:/Documents and Settings/Gideon/My Documents/Vasily-Alon paper/Seasonal2.csv")
> summary(aov(Total~Place*Station*Species*Week+Error(Subject/Week),data=Rep1)
+ )
Output:
Error: Subject
Df Sum Sq Mean Sq
Place 1 2570.3 2570.3
Error: Subject:Week
Df Sum Sq...
2011 Aug 27
1
Overdispersed GLM
Hi all,
I have the following data:
rep1_treat rep2_treat rep1_control rep2_control
2 3 4 5
100 20 98 54
0 1 2 3
23...
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...) == 0)
> + {
> + upsdebugx(4, "set_data_ablerex: Doing T stuff");
> + rc = usb_get_string_simple(udev, 4, report_buf, sizeof(report_buf));
> + get_done = TRUE;
> + }
> + else if (strcmp(str, "I\r") == 0)
> + {
> + char rep1[sizeof(report_buf)], rep2[sizeof(report_buf)];
> + int rc1, rc2;
> + upsdebugx(4, "set_data_ablerex: Doing I stuff");
> + rc1 = usb_get_string_simple(udev, 1, rep1, sizeof(report_buf));
> + rc2 = usb_get_string_simple(udev, 2, rep2, sizeof(report_buf));...
2012 May 10
2
Resampling question
Hello -
I have a population of 100 individuals that I would like to bootstrap
10 times, every time removing 5 *different* individuals.
So far, I have done the following:
pop <- read.table('mypop.txt', header=FALSE)
replicate(10, sample(pop, 95, replace=FALSE))
I have not actually gone through each of the 10 files created to make
sure no single individual was removed more than once
2009 Oct 26
3
changing kickoff time
Hello everybody,
we moved our samba server to a new machine. This included changing the
samba version from 3.024 to 3.4.2 and changing the OS from Linux to
Opensolaris.
Samba was compiled from scratch. Passdb Backend is tdb.
After the upgrade everything works fine......except:
Some users can not login, due to an expired account.
Further investigation showed that the "Kickoff Time"