[R] ggplot2 avoid automatic color selection

2011-06-10 Thread Immanuel B
Hey all, I'm trying to replicate some plots with ggplot2. The problem is that I need to specify the color for every attribute (drug). If I use the code below the colors get automatically assigned but I need to plot drug1 in black drug2 in blue etc. How do I do that? q = qplot(days,vol,data = cell

[R] test cases (data) for data based modeling

2011-06-06 Thread Immanuel B
Hello all, I'm working mostly with machine learning code in R and looking for a structured way to check if my code is working properly. For example if I train a classifier on some data. How do I know if the good / bad results are related to the data are not just an programming error that I introd

Re: [R] how to store object without loosing their class property

2011-05-31 Thread Immanuel B
ot;svm" > > For understanding what c does in your case: > > c(list(first=1, second=2), list(third=3, fourth=4)) > # compare this with list(list(first=1, second=2), list(third=3, fourth=4)) > > Kenn > > On Tue, May 31, 2011 at 4:43 PM, Immanuel B wrote: >> Hell

[R] how to store object without loosing their class property

2011-05-31 Thread Immanuel B
Hello all, I'm trying to store some objects (class = "svm") , but if I use a list the objects get somehow converted and I can't retrieve them as objects of type "svm". So how to I properly store objects of that kind? best regards --- library(e1071) data(iris) attach(iris) ## classifica

[R] how to interpret coefficients from multiclass svm using libsvm (for multiclass R-SVM)

2011-05-30 Thread Immanuel B
Hello all, I'm working with the svm (libsvm) implementation from library(e1071). Currently I'm trying to extend recursive feature elimination (R-SMV) to work with multiclass classification. My problem is that if I run svm for a 3 class problem I get a 2-D vector back from model$coefs, can someon