7
#8 4 79
A.K.
- Original Message -
From: Madhu Ganganapalli
To: "r-help@r-project.org"
Cc:
Sent: Wednesday, November 21, 2012 4:10 AM
Subject: Re: [R] FW: Select a random subset of rows out of matrix
Hi,
This is Madhu and I have a following doubt please give a solution...
**>i ha
ot;r-help@r-project.org"
Cc:
Sent: Wednesday, November 21, 2012 4:10 AM
Subject: Re: [R] FW: Select a random subset of rows out of matrix
Hi,
This is Madhu and I have a following doubt please give a solution...
**>i have the following data frame
from this i want to select a 80% of data randomly
Hi,
This is Madhu and I have a following doubt please give a solution...
**>i have the following data frame
from this i want to select a 80% of data randomly in such a way that
if the selected records are 1 and then we have to get the all records
corresponding to 1
similarly for 2 also and soon
Hi,
You could try something like this:
nrow = 1000
ncol = 10
nosample = 50
m = matrix(runif(1), nrow = nrow, ncol = ncol)
# Randomly select 50 row numbers and extract the data
m_subset = m[sample(1:nrow, size = nosample),]
cheers,
Paul
Haenlein.Michael wrote:
Dear all,
I have a large dat
On Mar 16, 2009, at 10:34 AM, Haenlein.Michael wrote:
Dear all,
I have a large dataset (N=100,000 with 89 variables per subject).
This dataset is stored in a 100.000 x 89 matrix where each row
describes one individual and each column one variable.
What is the easiest way of selecting a s
Dear all,
I have a large dataset (N=100,000 with 89 variables per subject). This dataset
is stored in a 100.000 x 89 matrix where each row describes one individual and
each column one variable.
What is the easiest way of selecting a subset of let's say 1.000 individuals
out of that whole matri
6 matches
Mail list logo