similar to: stats 'dist' euclidean distance calculation

Displaying 20 results from an estimated 200 matches similar to: "stats 'dist' euclidean distance calculation"

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
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
Hi I needed some help with ANOVA I have a problem with My ANOVA analysis. I have a dataset with a known ANOVA p-value, however I can not seem to re-create it in R. I have created a list (zzzanova) which contains 1)Intensity Values 2)Group Number (6 Different Groups) 3)Sample Number (54 different samples) this is created by the script in Appendix 1 I then conduct ANOVA with the command >
2008 Mar 15
2
Please find the error in my code
hello everybody I use the following code for my programming & it runs with the error as specified below.Any help that would disolve the error will be highly appreciated. Thanks in advance my code looks like this #### R programme 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
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
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 <- aov(Intensity ~
2011 Feb 17
4
Find and replace all the elements in a data frame
Hi all, I'm having a problem once again, trying to do something very simple. Consider the following data frame: x <- read.table(textConnection("locus1 locus2 locus3 A T C A T NA T C C A T G"), header = TRUE) closeAllConnections() I am trying to make a new data frame, replacing "A" with "A/A", "T" with "T/T", "G" with
2009 Jan 19
1
Deleting columns where the frequency of values are too disparate
Hello R-help community, I have another question about filtering datasets. Please consider the following "toy" data matrix example, called "x" for simplicity. There are 20 different individuals ("ID"), with information about the alleles (A,T, G, C) at six different loci ("Locus1" - "Locus6") for each of these 20 individuals. At any single locus
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]]
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
2011 Jun 21
2
interaction between categorical variables
Dear R-users, I need some  assistance. I am running some interactive variables for categorical variables. I have dgen(2 levels converted to dummy variables)  and dtoe(4-levels also converted to  dummy variables). So I have worked with them in two ways: i created a variable X1 = dgen*dtoe  and I get an error "Error in dgen * dtoe : non-conformable arrays"then i run a glm, binomial
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
2004 Feb 12
1
How do you create a "MCMC" object?
I have been running a Gibbs Sampler to estimate levels of efficiency in the Louisiana Shrimp Industry. I created a matrix (samp) where I stored the results of each iteration for 86 variables. I run 10,000 iterations. So, the matrix samp is 10,000 x 86. I want to use the gelman-rubin test to check for convergence. To do that, I need at least two chains. If I run second chain with different starting
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. ###################################################### ###########
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
2007 Sep 27
2
create data frame(s) from a list with different numbers of rows
# Hello, # I have a list with 6 categories and with different numbers of rows. # I would like to change each of them into a unique data frame in order to match # values with other data frames and perform some calculations. # Or I could make each category or list element have the same number of rows and create one large data.frame. # below is a creation of a sample list # I apologize for the
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
2011 May 05
0
Conditional distribution plot using Model-based Recursive Partitioning
Hello, I am using the party module to estimate the relationship between the probability of being a student and number of siblings (alive). However, I need to include a number of relevant covariates. My code is below: fm3 <- mob(Student ~ age + alive + sex2 + cwa + cha + cym | Religion+Servant + Literacy, control = ctrl, data = samp2, model = glinearModel, family =binomial()) plot(fm3, tp_args
2004 Feb 17
0
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
Dear friends, Over the past weeks, I have been asking a lot of questions about how to use R in Bayesian analysis. I am brand new to R, but I am very pleased with it. I started with winbugs but I found winbugs to be a limited software, not bad but has several limitations. By contrast, R allows the analyst to tackle any problem with a huge set of tools for any kind of analysis. I love R. In
2012 Jul 13
2
alternate tick labels and tick marks with lattice xyplot
Hi, I would like to use xyplot to create a figure. Unfortunately, I cannot find documentation in xyplot to specify alternating the x-axis tick labels with the x-axis tick marks. I can do this with the regular R plot function as follows. #A small version of my data looks like this data<-data.frame(matrix(ncol=3,nrow=12)) data[,1]<-rep(c(1,2,3),c(4,4,4)) data[,2]<-rep(c(1,2,3,4),3)