Displaying 6 results from an estimated 6 matches for "samp3".
Did you mean:
samp
2018 Mar 15
3
stats 'dist' euclidean distance calculation
...dean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated:
3x3 subset used
Locus1 Locus2 Locus3
Samp1 GG <NA> GG
Samp2 AG CA GA
Samp3 AG CA GG
The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2))
My assumption was that the difference between x_i and y_i would be the number of allelic differences at each base pair site between samples. For example, the euclidean distance b...
2010 May 23
2
Subsetting with a list of vectors
...7 random plots for 100 times.
(There are 50 plots in total)
So I created a list of 100 vectors, each vector has 7 elements.
samp <- lapply(1:100, function(i) sample(LETTERS))
samp2 <- lapply(samp2, "[", 1:7)
How can I select the 26 plots from 'data' using 'samp'?
samp3 <- sample(LETTERS, 7)
samp4 <- subset(data, plot %in% samp3) # this works
samp5 <- subset(data, plot %in% samp2[[1]]) # this works as well, but
I used a for loop to get it to select 7 plots 100 times.
for (i in nrow(samp2)) {
samp6 <- subset(data, plot %in% samp2[[i]])
} # this d...
2018 Mar 15
0
stats 'dist' euclidean distance calculation
> 3x3 subset used
> Locus1 Locus2 Locus3
> Samp1 GG <NA> GG
> Samp2 AG CA GA
> Samp3 AG CA GG
>
> The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2)) My
> assumption was that the difference between x_i and y_i would be the number
> of allelic differences at each base pair site between samples.
Base R does not...
2010 Jul 06
2
Help With ANOVA
...2, -4.60517, 2.121427, 1.973118,
-4.60517, 2.251568, -4.60517, 2.270724, 0.70338, 0.963816, -4.60517, 0.023703, -4.60517,
2.043382, 1.070586, 2.768289, 1.085169, 0.959334, -0.02428, -4.60517, 1.371895, 1.533227)
"zzzanova" <-
structure(list(Intensity = c(t(Samp1), t(Samp2), t(Samp3), t(Samp4)),
Group = structure(c(1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6), .Label = c("Group1", "Group2", "Group3", "Group4", "Group5&q...
2006 Nov 09
1
dissimilarity matrices
Dear All,
I have a dissimilarity matrix which I happily convert to a distance object
by running:
X <- as.dist(Y)
and I can happily now run either hclust(X) or agnes(X).
So that the various bits of output are labelled correctly I would dearly
like to be able to give names to the columns and rows of X, as would happen
if I ran:
mydata<-read.table("clipboard",header=T)
2010 Mar 09
3
Help with ANOVA in R
...hod (aov) assumes equal variances. How can I adjust this to do an ANOVA with unequal variances
#####SCRIPT STARTS
#Creates a structured list suitable for ANOVA analysis
# Intensity Group (1,2,3,4) Sample(1:62)
"zzzanova" <-
structure(list(Intensity = c(t(Samp1), t(Samp2), t(Samp3), t(Samp4)),
Group = structure(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4), .Label = c("Group1", "Group2", "Group3", "Group4"), class = "fac...