search for: samp1

Displaying 13 results from an estimated 13 matches for "samp1".

Did you mean: samp
2018 Mar 15
3
stats 'dist' euclidean distance calculation
...the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean 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...
2008 Mar 15
2
Please find the error in my code
...e for simulating the power of the two sample t test vs various #### non-parametric alternatives sim.size <- 200 sample.size <- 10 set.seed(231) mu1 <- 0 delta <- seq(-2,2, length=50) for (j in 1:length(delta)) { mu2 <- mu1 + delta[j] for (i in 1:sim.size) { # Generate ith sample samp1 <- rnorm(mean=mu1,sample.size) samp2 <- rnorm(mean=mu2,sample.size) # Perform ith set of tests test1 <- t.test(samp1, samp2,alternative = c("two.sided")) pt.test[i] <- (test1$p.value < 0.05) test2 <- wilcox.test(samp1, samp2,alternative = c("two.side...
2002 Jul 22
3
Vector Manipulation
Greetings, I wonder if someone could point me towards a more elegent solution than what I"ve kluged together. I have a vector "samp1" of 296 integers. They are sorted in ascending order and the numbers range from 177 to 228,953. I'd like to specify N non-overlapping intervals covering the range from 0 to 229,354 and then for each range, count the number of integers from samp1 that fall into that range. What I'll e...
2002 Sep 28
1
Getting .Python to Work Under Windows
Hi all, I'm trying to call a function in a Python module (v2.2) from within R (Windows, v1.5.0) but am not having any luck. I've installed RSPython_0.4-0.zip and the following lines of code cause R to crash: # R code library(RSPython) out <- .Python("samp1", .module="Sample") # Python file: Sample.py def samp1() : return 1 Obviously this is not the actual Python function I want to use, but it seems R is crashing on any .Python call I'm making, and I can't even get it to work on simple functions. If any could please help, th...
2010 May 23
2
Subsetting with a list of vectors
Hi, I have a dataset that looks like the one below. data plot plantno. species H 31 ABC D 2 DEF Y 54 GFE E 12 ERF Y 98 FVD H 4 JKU J 7 JFG A 55 EGD . . . . . . .
2010 Jul 06
2
Help With ANOVA
...7, -4.60517, 1.846162, -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&q...
2003 Apr 04
3
Sampling from a Data Frame
Hi, I've been looking through the documentation for sample(), but can only get it to work with vectors. Is it possible to sample from a dataframe? -- Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it kills its students */ -- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab
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 betw...
2009 Oct 14
2
Getting indeices of intersecting elements.
Hi, Is there a command to get the indices of intersecting elements of two vectors as intersect() will give the elements and not its indices. Thanks in advance. Praveen Surendran School of Medicine and Medical Sciences University College Dublin Belfield, Dublin 4 Ireland. [[alternative HTML version deleted]]
2003 Apr 08
3
density ranges for uniform law
Hello, I would have some details and explanations about the results I get. In fact, I start with a uniform sample between -1 and 1, and then plot its density. My problem is that the density ranges are much more longer than I expected : samp <- runif(10000,-1,1) plot(density(samp)) Instead of varying between -1 and 1, the density varies between approximaly -1.5 and 1.5 Could someone explain
2010 Mar 09
3
Help with ANOVA in R
Hi I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using this correctly. Two major questions I have are: 1) Is using the code (zzz.aov...
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)
2007 Nov 26
2
Filling in a Zero Matrix
Hi I am very new to R and statistical programming in general. I am trying to reorder data from a .csv file. I have managed to import the data and create a zero matrix. I am now trying to fill the matrix. There seems to be some problem with this section of my code. I have highlighted the dodgy code in red. Please help if possible. ###################################################### ###########