Re: [R] Is there an ID3 implementation in R?

2014-09-02 Thread Christian Schulz
Yes with: make_Weka_classifier(name, class = NULL, handlers = list(), init = NULL) HTH, Christian Hi Wensui, When I looked at their docs: http://cran.r-project.org/web/packages/RWeka/RWeka.pdf It appeared they only have a connection to: J48 LMT M5P DecisionStump Is it possible to connect it

Re: [R] Markov Decision Process

2013-09-14 Thread Christian Schulz
Maybe msm (Multi-state modelling) is a starting point. You'll find the manual in the package/doc folder after installation. HTH Christian Dear All, I am struggling with the conceptual aspects of a problem. I am sure that someone on this list must be familiar with this. Let's say that you

Re: [R] UNIX-like cut command in R

2011-05-03 Thread Christian Schulz
On Mon, 2 May 2011, P Ehlers wrote: Use str_sub() in the stringr package: require(stringr) # install first if necessary s - abcdefghijklmnopqrstuvwxyz str_sub(s, c(1,12,17), c(3,15,-1)) #[1] abclmno qrstuvwxyz Thanks. That's very close to what I'm looking for, but it

Re: [R] loading only parts of RData files?

2011-05-03 Thread Christian Schulz
Hi, g.data is perhaps a interesting package for you. HTH, Christian Dear List members, I would like to load R objects saved as RData file but ran into the problem that these objects are too large for my RAM ('Can not allocate vactor of size XX...'). Switching to a Linux machine is no

Re: [R] question on sqldf syntax

2010-01-26 Thread Christian Schulz
Maybe that's a problem with the RSQLite package , probably detaching the package help. detach(package:RSQLite) HTH, Christian trying to structure sql to merge two datasets. structure follows: dbs.possible.combos (all possible combinations of dates and places) Date Place 1/1/10 N-01 1/1/10

[R] [Fwd: Re: question on sqldf syntax]

2010-01-26 Thread Christian Schulz
Sorry mistake from me. This was another problem in my mind , but with RMySQL. Christian library(RMySQL) library(sqldf) sqldf(Select * from mtcars) Fehler in mysqlNewConnection(drv, ...) : RS-DBI driver: (Failed to connect to database: Error: Access denied for user 'user'@'localhost' (using

Re: [R] ggplot2 histogramm

2010-01-19 Thread Christian Schulz
...@googlegroups.com On Mon, Jan 18, 2010 at 4:34 AM, Christian Schulz chsch...@email.de mailto:chsch...@email.de wrote: Hi, i get no success change the title of the fill (colour) legend and the defintion of levels. Have anybody a hint how i can do this. df - data.frame(variable

[R] ggplot2 histogramm

2010-01-18 Thread Christian Schulz
Hi, i get no success change the title of the fill (colour) legend and the defintion of levels. Have anybody a hint how i can do this. df - data.frame(variable=sample(c(A,B,C),1000,replace=T,prob=c(0.22,0.28,0.5)),group=gl(2,500)) p - ggplot(df, aes(x = variable)) p + geom_histogram(aes(y=

[R] data.frame to stacked frame

2009-12-07 Thread Christian Schulz
Hi, have anybody a hint how i could avoid the cumbersome way (..especially the value part) change the data representation from n column data.frame to an stacked representation. many thanks Christian #example data dfw - as.data.frame(matrix(runif(10*10),ncol=10)) dfw$group -

Re: [R] Data Step: Outer Join Rows, Inner Join Columns

2009-09-29 Thread Christian Schulz
Hi, if you like to use sql you can use the sqldf package. Another possibility is the basic function merge. HTH Christian Hi, how can I do a data step in R which can be best described in SQL terminology as an outer join of rows (eg cases) and inner join of columns (variables)? In

Re: [R] glm analysis repeated for 900 variables

2009-09-23 Thread Christian Schulz
Hi, nvars - 902 data - as.data.frame(matrix(runif(100*nvars),ncol=nvars)) colnames(data)[901] - c('phenotype') colnames(data)[902] - c('outcome') ### catch all aic values ### res - matrix(nrow=900,ncol=2) for (i in 1:(length(data)-2)) { res[i,1] - names(data)[i] res[i,2] -

Re: [R] glm analysis repeated for 900 variables

2009-09-23 Thread Christian Schulz
On 23/09/2009, at 11:26 PM, Christian Schulz wrote: Hi, nvars - 902 data - as.data.frame(matrix(runif(100*nvars),ncol=nvars)) colnames(data)[901] - c('phenotype') colnames(data)[902] - c('outcome') snip Just ***WHAT*** do you think the ``c( )'' is doing for you

[R] delete duplicated conditional

2009-08-28 Thread Christian Schulz
Hi, have anybody a hint, how i could keep the duplicated with a condition in a second column, i.e. maximum in column 620. nodups - apos[!duplicated(apos[,1]),c(1,620)] many thanks Christian __ R-help@r-project.org mailing list

Re: [R] delete duplicated conditional

2009-08-28 Thread Christian Schulz
i get it. aposSorted - apos[order(apos[,620],decreasing=TRUE),] nodups - aposSorted[!duplicated(aposSorted[,1]),c(1,620)] Hi, have anybody a hint, how i could keep the duplicated with a condition in a second column, i.e. maximum in column 620. nodups - apos[!duplicated(apos[,1]),c(1,620)]

Re: [R] ROC curve and gains/lift chart

2009-08-21 Thread Christian Schulz
Have look in the ROCR package and Example's. HTH Christian What is the difference between ROC curve and gains/lift chart? how to do them in R? Thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Strange error with ROCR

2009-08-04 Thread Christian Schulz
Hi, you need the score value , have a look at ?svm.predict and in the ROCR example. traindata - as.data.frame(matrix(runif(1000),ncol=10)) trainlabels - as.factor(sample(c(win,lose),nrow(data),replace=T,prob=c(0.5,0.5))) model - svm(traindata,trainlabels, type=C-classification,

Re: [R] hands-on classification tutorial needed...

2009-07-11 Thread Christian Schulz
Hi, did you balance your trainset? IMHO in the caret package are helpful functions for doing grid-search with different classifiers. http://cran.r-project.org/web/packages/caret/vignettes/caretTrain.pdf HTH,Christian Hi all, I am doing binary classification and want to improve the

[R] raw object into mysql blob column

2009-07-10 Thread Christian Schulz
Hi, exist a possibility write a raw object into a mysql blob column? My first trial and a second with a rawToChar after .jserialize didn't work. mobj - .jserialize(model) str(mobj) raw [1:203761] ac ed 00 05 ... sqlstring=paste(Insert into testtable (varname,number,model)

[R] vertical label on x-axis

2009-06-24 Thread Christian Schulz
Hi, have anybody a hint how it's possible plot the labels in the x-axis vertical to get more space. dotplot( value ~ abbreviate(attribute,minlength=3),data=tabstat10,ylim=c(0,1),col=blue,ylab=Value,type=p,par.settings=my.theme) Many thanks, Christian

Re: [R] vertical label on x-axis

2009-06-24 Thread Christian Schulz
I get it : scales=list(x=list(rot=90)) Cheers, Christian Hi, have anybody a hint how it's possible plot the labels in the x-axis vertical to get more space. dotplot( value ~ abbreviate(attribute,minlength=3),data=tabstat10,ylim=c(0,1),col=blue,ylab=Value,type=p,par.settings=my.theme)

[R] label sorting x-axis

2009-06-24 Thread Christian Schulz
a look at the las option under ?par nevertheless. Not sure whether it works in your example, though. HTH, Michael -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Christian Schulz Sent: Mittwoch, 24. Juni 2009 14:04 To: r-help@r

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Christian Schulz
Maybe the packages caret,RWeka and ROCR are usefuel starting points. Cheers, Christian Hi all, Could anybody give me some pointers to Cross Validation using Lifting Score as error function, as commonly used in data-mining and classification field in marketing and e-commerce research? Thanks!

[R] RWeka memory problem

2009-06-18 Thread Christian Schulz
Hello, i get some memory problems using RWeka and i'm wondering because i have only ~ 400MB in RObjects without a high memory consuming operation when a crash occur. Look into hs_err_pid.log , it seems that the VM max heap size is only 512 mb. VM Arguments: jvm_args: -Xmx512m vfprintf

Re: [R] r scripting

2009-06-18 Thread Christian Schulz
Hi, perhaps that is what you want? df - as.data.frame(matrix(runif(100),ncol=10)) form - as.formula(paste(names(df)[length(df)], ~ .)) lm(form,data=df) Call: lm(formula = form, data = df) Coefficients: (Intercept) V1 V2 V3 V4 -1.367 -2.920

Re: [R] Updating from an Old to a New version of R

2008-11-09 Thread Christian Schulz
Hi, in Windows install the new R-base Installer in a new folder , move or copy all additional packages from old library folder to the new one (..do not overwrite the packages included in the base installation!). Now start the new version and type: update.packages(ask=F). regards, Christian

Re: [R] paste dependent variable in formula (rpart)?

2007-12-17 Thread Christian Schulz
Christian Schulz wrote: Hello, i'm trying to replace different target variables in rpart with a function. The data.frame getting always the target variable as last column. Try below, i get the target variable in the explained variables, too!? Have anybody an advice to avoid

Re: [R] RMySQL installation problem - partially solved

2007-12-17 Thread Christian Schulz
I think you should use the newest DBI Version with 2.6.1. regards, christian It seems to be an 2.6.1 Version problem. I tried to use http://umfragen.sowi.uni-mainz.de/CRAN/bin/windows/contrib/2.2/DBI_0.1-10.zip with 2.6.1 and 2.2.0 It is working with 2.2.0 (build under R Version 2.2.1) Knut

Re: [R] RMySQL installation problem - partially solved

2007-12-17 Thread Christian Schulz
Knut Krueger wrote: Christian Schulz schrieb: I think you should use the newest DBI Version with 2.6.1. regards, christian I run *actualice packages*, this should update to the newest DBI, shouldn't it? Knut I'm not sure, perhaps you are on an old branch? Try for 2.6.1: http