similar to: Subsetting with a list of vectors

Displaying 20 results from an estimated 200 matches similar to: "Subsetting with a list of vectors"

2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate 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
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 >
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
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)
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]]
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 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
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
2004 Mar 09
2
maxima
Dear all, suppose I have a bi-variate function f(x,y), I want to find the maxima. I define x and y vector, and get matrix z=f(x,y). how can I get which (x0,y0) makes z become the maxima? I can do two loops to get the x0 and y0, but I think there may exist a function to do this.
1997 Oct 20
3
No subject
Hi, I am currently trying to switch from Splus to R and I would like to know whether there is a way of transfering Splus objects stored on disk into the R environment. In Splus I would do this using the function get, e.g., foo <- get(foo,where="dirname") where dirname is the name of a directory containing the Splus objects. In R, argument 'where' of function get appears to
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. ###################################################### ###########
2011 Dec 21
1
Looping over files
Hi, ?I have a list of files in one of my working directories: "chr17.chunk1.dose.fvd" "chr17.chunk1.dose.fvi" "chr17.chunk1.prob.fvd"? "chr17.chunk1.prob.fvi"? ........... ......... ........ "chr17.chunk10.dose.fvd" "chr17.chunk10.dose.fvi" "chr17.chunk10.prob.fvd" "chr17.chunk10.prob.fvi" And I am
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
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
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
2013 Jul 03
1
best way to provide disk storage for vm without shared storage system
Hello. I'm very happy with libvirt and qemu, that great software! (after some playing i want to create golang bindings to libvirt).. Now i provide ext4 fs for qcow2 images (raid1 with two sata disks). Now i don't need live migration (but may need it in feature). What is the best way to provide disks to vm in case of performance, ability to create backups (i don't want lvm snapshots)?
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
2009 Jun 17
1
run time error '2004' -- out of memory
I am having trouble running a few progs in Wine. Certexams.com Jnet simulator and Simulator Demo. Both give me a "run-time error '2004'" out of memory when ran sys specs Wine 1.1.23 1.8ghz 2 gig ram 200 gig hdd 40 gig hdd 40 gig hdd 256 mb fx5500
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