s-news
[Top] [All Lists]

random partitioning of a data frame

To: s-news@lists.biostat.wustl.edu
Subject: random partitioning of a data frame
From: Wei Ye <weiye1@yahoo.com>
Date: Fri, 18 Jan 2008 16:42:02 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=x+sL9kLKFst6zAHq+0nw+Yxl4QS1N7clIPKiQn/Bmx1Ew42VIqU/gN0Bl3TiPUYk8WVVrHz7Vic8B7q8ZW+cfb+P/Hr5+EDtGT4pXWs5fexn8gex4I37kjgzQ/rPeep8iFwHsQ6P57o6rIy0cktBGERaWoY86AaNXpuHKK5hlzE=;
Dear S-news members:

I am new to S-plus programing.I would really
appreciate it if somebody can help me with this.

I took a random sample from a large data frame x
using:
samp1<-x[sample(1:nrow(x), 100,replace=F),]. 
But I also want to keep the observations that were not
selected. How do I separate the observations that were
sampled and those that were not sampled? Thanks a lot.

Wei




      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


<Prev in Thread] Current Thread [Next in Thread>