[R] sample equal number of cases per class

2012-11-04 Thread ollestrat
Dear community I have a dataframe and want to split it into a learn and a test partition. However the learnset should be balanced, i.e. each class should have the same number of cases. I tried and searched a lot, without success so far. Maybe you can help? Some example code *# generate example

[R] predict pixels of raster using caret-derived models

2012-09-10 Thread ollestrat
Is it somehow possible to use the the predict method of the raster package with a prediction model obtained using caret's train()? / predict(rasterStack, carettrain, filename=..., progress='text', format=BSQ, datatype='INT1U', type='response', overwrite=TRUE) / Thank you -- View this

Re: [R] -1.1 - 0.1 + 1.2 is NOT null! Why?

2012-07-13 Thread ollestrat
Thank you for the explanation. Good to know about the issue how double values are constructed by a bit system. This makes me handling double values with care in using it in R or aother languages control structures etc. Thank you also for the hint concerning the Null vs. Zero vs.. issue. Yes, the

Re: [R] -1.1 - 0.1 + 1.2 is NOT null! Why?

2012-07-13 Thread ollestrat
Someone pointed me to this paper: http://www.validlab.com/goldberg/paper.pdf -- View this message in context: http://r.789695.n4.nabble.com/1-1-0-1-1-2-is-NOT-null-Why-tp4636053p4636433.html Sent from the R help mailing list archive at Nabble.com. __

[R] -1.1 - 0.1 + 1.2 is NOT null! Why?

2012-07-10 Thread ollestrat
Hello, I fear its a stupid question,..but here it is: If I do this simple calculation with the R console, I surprisingly do not get a zero. Why? -1.1-0.1+1.2 [1] -2.220446e-16 greetings, Ole -- View this message in context: