similar to: Making a point-sampling matrix

Displaying 20 results from an estimated 20000 matches similar to: "Making a point-sampling matrix"

2010 Dec 11
2
package sampling
Hi R users. I have a problem with function strata in sampling packages. > st0 = strata(dom, stratanames="stratas", size=sample.size, method="systematic",pik, FALSE) Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? In previous version of R 2.9.1 and previous version of package sampling this code worked
2007 Jun 28
2
sampling question
I am interested in locating a script to implement a sampling scheme that would basically make it more likely that a particular observation is chosen based on a weight associated with the observation. I am trying to select a sample of ~30 census blocks from each ZIP code area based on the proportion of women in a ZCTA living in a particular block. I want to make it more likely that a block will
2010 Nov 18
3
Sample covariance matrix in R
Hello everyone. I would like to find the sample covariance matrix using R. So far I read on the wikipedia what a sample_covariance is http://en.wikipedia.org/wiki/Sample_covariance according to wikipedia one vector is enough to calculate the sample covariance matrix. In R I tried cov(myvector) and I get the reply that I need to pass either two argument or one matrix with x,y values . How can I
2008 Jan 31
2
permutates and/or samples a matrix
Hi, sample(x) only permutates and/or samples from a vector, which I can't use for a matrix. Please help. Thanks Stanley [[alternative HTML version deleted]]
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. ###################################################### ###########
2013 Feb 14
2
Plot a Matrix as an Image with ggplot
Dear all, I am trying to plot a matrix I have? as an image str(matrixToPlot) ?num [1:21, 1:66] 0 0 0 0 0 0 0 0 0 0 . ?that contains only 0s and 1s, where the xlabel will be Labeled as str(xLabel) ?num [1:66] 1e+09 1e+09 1e+09 1e+09 1e+09 ... and the yLabels will be labeled as str(yLabel) ?num [1:21] -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 ... I have found on the internet that I can do
2011 Apr 02
2
Matrix manipulation
Hi all! I have a vector, let's say for example int <- sample(1:20,10); for now: now I have a matrix... M = m x n where the first column is a "feature" column and most likely shares at least one of the int (interesting) numbers. I want to extract the rows where int[] = M[,1] I thought: rownames(int)<-int; rownames(M)<-M[,1]; M[rownames(int),] would work, but it
2006 Mar 23
3
Sampling in R
Hi all! I was wondering if you can help me with a little sampling issue I'm having in R. I have a database with 100 observations. I need to sample n=9 sample size, 200 times (i.e. get 200 samples of size 9). N (pop. size) =100 Each sample can't contain the same observation more than one time (i.e. the program needs to check if the obs. has already been sampled into the sample -
2011 Feb 02
2
Help me apply mapply
Hello all I would like to ask your help use mapply. I have a function called findCell that takes two arguments(x,sr) where x is a vector of size two (e.g x<-c(2,3) and sr is a matrix. I would like to call many times the findCell function (thus I need mapply) for different x inputs but always for the same sr. as x is a vector of size two (two cells) I want to pass inside inside the following
2010 Jul 14
1
convert data.frame to matrix -> NA factor problem
Hi list, I tried to convert a data.frame into a matrix using data.matrix. Unfortunately my matrix contains missing values (NA) wherefore all columns including NA's were changed into factors. I thought that many people stumbled across that problem already wherefore there must be a simple solution. But it seems there isn't. I tried lapply, replace and other things in combination but still
2008 Jun 12
1
Data.matrix fail to convert data.frame into matrix
Hi, With the following codes, I attempt to convert the data.frame into a matrix. However I notice that data.matrix function doesn't seem to work. __ BEGIN__ dat <- read.table("mydata", comment.char = "!" , na.strings = "null"); # Select n-genes by random sample # n = 1 nosamp <- 1 geneid <- sequence(nrow(dat)) geneid.samp <- sample(geneid,nosamp)
2010 Sep 13
1
print matrix values and if statement
Hello everyone, I have a 2x2 matrix filled with zeros and some more values around zeros. I would like to print only the non-zero values and to keep the coords of the places that the values are not zero. Could you please help me with that? I would like to thank you in advance for your help Best Regards Alex [[alternative HTML version deleted]]
2007 Oct 23
1
create diagonal matrix within a for cycle
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071023/b860b22b/attachment.pl
2009 Apr 21
6
Sampling in R
[This email is either empty or too large to be displayed at this time]
2012 Jul 26
4
Variables in a Tabular form. easily saved in a txt file
Dear all, I would like to save few variable-names with their values in a tabular form, with that I mean that files can be printed easily in R in a tabular form and also saved in a ascii file that when one opens it see also the variables in a nice tabular format. IS that possible? Below a small example of how should look results in R and in a txt file.              Postal Code | Superb
2010 Jan 16
2
La.svd of a symmetric matrix
Dear R list users, the singluar value decomposition of a symmetric matrix M is UDV^(T), where U = V. La.svd(M) gives as output three elements: the diagonal of D and the two orthogonal matrices u and vt (which is already the transpose of v). I noticed that the transpose of vt is not exactly u. Why is that? thank you for your attention and your help Stefano AVVISO IMPORTANTE: Questo messaggio di
2007 May 02
2
how to reproduce the same sampled units?
Hi all, Is it possible to generate the same sample number of times in R? In SAS, using the option "seed" it is possible to reproduce exactly the same sample. Is there any such feature in R which I can use? For further clarity, for (i in 1:2) { samp = sample(1:1000,100,replace = FALSE) print(samp) } For the above simulation, is it possible to generate the same sampled units
2010 Sep 28
4
drawing samples based on a matching variable
Hi, everyone. I have what I hope will be a simple coding question. It seems this is a common job, but so far I've had trouble finding the answer in searches. I have two matrices (x and y) with a different number of observations in each. I need to draw a random sample without replacement of observations from x, and then, using a matching variable, draw a sample of equal size from y. It is the
2013 Oct 21
2
plot correlation matrix
Hi all, I am having 4 vectors like Data: num [1:4, 1:32] -82.8 -81.8 -75.5 -107.6 -87.6 ...  and I want to calculate the correlation between those. Is there a graphical way in R to plot the correlations or not? I would like to thank you in advance for your help Regards Alex [[alternative HTML version deleted]]
2010 Sep 09
2
See what is inside a matrix
Hello everyone.. Is there any graphical tool to help me see what is inside a matrix? I have 100x100 dimensions matrix and as you already know as it does not fit on my screen R splits it into pieces. I would like to thank you in advance for your help Best Regards Alex [[alternative HTML version deleted]]