I'm not sure what you mean by "balance", but you can use sample() to
randomly order the values 1:1000, then use the first 700 as row
indices for the first set, and the last 300 as the test set.

Sarah

On Mon, Nov 19, 2012 at 12:16 PM, Eddie Smith <eddie...@gmail.com> wrote:
> Hi guys,
>
> I have 1000 rows of a dataset. In my analysis, I need 70% of the data,
> run my analysis and then use the remaining 30% to test my model.
>
> Could anybody kindly help me on this?
>
> Cheers
--
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to